Customizing Data Text

In this section:

Data text is normally drawn for all series and groups using the same numeric format (for example, general, $, %, and so on). You can use setDisplay() to show/hide data text for individual series.

setDisplay(getDataText(0), false); // Hide data text for series 0
setDisplay(getDataText(1), true); // Show data text for series 1

When setCustomDataText() enables customized data text for a particular series, you can change the numeric format of the individual series of data text as well as specify font characteristics.

Example:

setDepthAngle (0);
setDepthRadius (0);
setGraphType (41);
setCustomDataText (getSeries (2), true);
setCustomDataText (getSeries (1), true);
setCustomDataText (getSeries (0), true);
setTextFormatPreset(getDataText (2), 5);
setTextFormatPreset(getDataText (1), 6);
setTextFormatPreset(getDataText (0), 2);
setDataTextDisplay (true);
setViewableSeries (3);
setFontName(getDataText(2), "Comic Sans MS");
setFontName(getDataText(0), "Garamond");
setFontSizeAbsolute(getDataText(1), true);
setFontSize(getDataText(1), 14);        
setTextJustHoriz(getDataText(1),1);
setShadowDisplay(getDataText(1), true);

line graph with customized data text


Top of page

x
get/setCustomDataText()

When data text is displayed with setDataTextDisplay(true), these methods get/set custom formatting of an individual series of data text. When custom data text is enabled for a series, use the setTextFormatPreset() and/or setTextFormatPattern() methods to define the format of data text for individual series.

Syntax:

boolean getCustomDataText( IdentObj idSeries );
void setCustomDataText( IdentObj idSeries, boolean bNewValue );

where:

idSeries

Is the object ID returned by a getObjectID() method (for example, getSeries()).

bNewValue

Is one of the following values:

Return:

boolean; true = custom data text is enabled for the specified series, false = custom data text is not enabled

Example:

setDepthAngle(0);
setDepthRadius(0);
setGraphType(41);
setCustomDataText(getSeries(2), true);
setCustomDataText(getSeries(1), true);
setCustomDataText(getSeries(0), true);
setTextFormatPreset(getDataText(2), 5);
setTextFormatPreset(getDataText(1), 6);
setTextFormatPreset(getDataText(0), 2);
setDataTextDisplay(true);
setViewableSeries(3);

line graph with custom data text


WebFOCUS