Legend Properties

LegendAutomatic

This property enables / disables automatic sizing and positioning of the legend box. When this property is true, the charting engine will automatically set the size of the legend box to half of the height/width of the chart and position the legend box in the center of the chart frame.

DATA TYPE:

boolean

RANGE:

true / false; true = Charting engine automatically calculates position and size of legends, false = Do not automatically calculate position and size of legends

DEFAULT:

false

SYNTAX:

setLegendAutomatic(boolean newValue);
boolean = getLegendAutomatic();

EXAMPLE:

setViewableGroups(3);
setViewableSeries(3);
setDataScrollerPresenceGroups(0);
setDepthRadius(0);
setLegendOrient(0);
setLegendAutomatic(true);
setY1AxisSide(1);
setLegendRect(new Rectangle(-15340,-3478,4948,18550));

setLegendAutomatic(false);

ALSO SEE:

LegendDisplay, LegendMarkerPosition, LegendReverse, LegendTextAutofit, setLegendRect()

LegendDisplay

This property enables/disables drawing of the legend box. It also affects all legend area objects (legend text, legend marker, and legend line). When the legend is not drawn, neither are its components. Legends are not displayed for histogram charts or any chart that is colored by group (ColorMode=2).

DATA TYPE:

boolean

RANGE:

true / false; true = Show the legends, false = Do not show the legends

DEFAULT:

true

SYNTAX:

void setLegendDisplay(boolean newValue);
boolean getLegendDisplay();

EXAMPLE:

setDepthRadius(0);
setLegendDisplay(true);

setLegendDisplay(false);

ALSO SEE:

LegendAutomatic, LegendMarkerPosition, LegendReverse, LegendTextAutofit, UseSeriesShapes, setLegendRect()

LegendMarkerPosition

This property sets the location and format of the chart legends.

DATA TYPE:

integer

RANGE:

0...4; 0 = Legend box to the left of legend text, 1 = Legend text to the left of legend box, 2 = Legend text below legend box, 3 = Legend text above legend box, 4 = Legend text inside legend box

DEFAULT:

0 (Legend box to the left of legend text)

SYNTAX:

void setLegendMarkerPosition(int newValue);
int getLegendMarkerPosition();

EXAMPLE:

setViewableGroups(3);
setViewableSeries(3);
setDataScrollerPresenceGroups(0);
setDataScrollerPresenceSeries(0);
setDepthRadius(0);
setLegendOrient(0);
setLegendAutomatic(false);
setY1AxisSide(1);
setLegendMarkerPosition(0);
setLegendRect(new Rectangle(-15340,-3478,4948,18550));

setLegendMarkerPosition(1);

setLegendMarkerPosition(2);

setLegendMarkerPosition(3);

setLegendMarkerPosition(4);

ALSO SEE:

LegendAutomatic, LegendDisplay, LegendReverse, LegendTextAutofit, UseSeriesShapes, setLegendRect()

LegendMarkerSizeMax

This property sets the maximum size of legend markers in virtual coordinates.

DATA TYPE:

integer

RANGE:

100...1800 (Smaller or larger values will be ignored)

DEFAULT:

1800

SYNTAX:

void setLegendMarkerSizeMax(int newValue);
int getLegendMarkerSizeMax();

EXAMPLE:

setGraphType(61);
setLegendMarkerSizeMax(500);

setGraphType(61);
setLegendMarkerSizeMax(1500);

NOTE:

The actual size of the legend markers is affected by the size of the chart and the size of the legend rectangle set by setLegendRect().

LegendMarkersPerRow

This property specifies the number of legend markers to draw in a single row in the legend area.

DATA TYPE:

integer

RANGE:

0...number of series in graph (0 = draw the same number of markers in a row as the number of series in the graph). Any other value will draw that number of series in a row.

DEFAULT:

0 (draw the same number of markers in a row as the number of series in the graph)

SYNTAX:

void setLegendMarkersPerRow(int newValue);
int getLegendMarkersPerRow();

EXAMPLE:

setLegendAutomatic(false);
setLegendMarkersPerRow(2);

setLegendAutomatic(false);
setLegendMarkersPerRow(3);

NOTE:

LegendAutomatic must be set to false.

LegendOrient

This property controls the orientation of the legend markers in the legend area. If vertical (0) or horizontal (1) is selected, the size and placement of the legend area may need to be changed to accomodate the legend markers and legend text. The setLegendRect() method can be used for this purpose.

DATA TYPE:

integer

RANGE:

0...2; 0 = Vertical, 1 = Horizontal, 2 = Auto (determined by height/width of Legend Rectangle)

DEFAULT:

2

SYNTAX:

void setLegendOrient(int newValue);
int getLegendOrient();

EXAMPLE:

setDepthAngle(0);
setDepthRadius(0);
setFootnoteDisplay(false);
setSubtitleDisplay(false);
setTitleDisplay(false);
setLegendAutomatic(false);
setLegendOrient(0);
setLegendRect(new Rectangle(-16340,-2478,5948,17550));

NOTE:

LegendAutomatic must be set to false.

LegendReverse

This property enables (true) / disables (false) drawing of legends in reverse order.

DATA TYPE:

boolean

RANGE:

true / false; true = Draw legends in reverse order, false = Draw legends in normal order

DEFAULT:

false

SYNTAX:

void setLegendReverse(boolean newValue);
boolean getLegendReverse();

EXAMPLE:

setLegendMarkerPosition(4);
setLegendReverse(true);

setLegendReverse(false);

ALSO SEE:

LegendAutomatic, LegendDisplay, LegendMarkerPosition, LegendTextAutofit, UseSeriesShapes, setLegendRect()

LegendScroll

This property controls the presence of scroll bars in the legend area. If the legend scroll bar is enabled with LegendScroll(1) or LegendScroll(2), you must set the starting series to show with LegendSeriesStart and the number of series to show in the scroll area with LegendSeriesCount.

DATA TYPE:

integer

RANGE:

0...2; 0 = Never show legend scroll bar, 1 = Only show legend scroll bar when the number of series exceeds the size of the legend area, 2 = Always show legend scroll bar

DEFAULT:

true

SYNTAX:

void setLegendScroll(int newValue);
int getLegendScroll();

EXAMPLE:

setDepthAngle(0);
setDepthRadius(0);
setFootnoteDisplay(false);
setSubtitleDisplay(false);
setTitleDisplay(false);
setLegendAutomatic(true);
setLegendScroll(2);
setLegendSeriesCount(2);
setLegendSeriesStart(0);
setLegendOrient(0);
setLegendRect(new Rectangle(-15340,-2478,5948,17550));

NOTE:

This property is not available in gantt charts.

ALSO SEE:

LegendSeriesCount, LegendSeriesStart

LegendSeriesCount

When the legend scroll bar is enabled with LegendScroll(1) or LegendScroll(2), this property defines the number of series to show in the scrolled legend area.

DATA TYPE:

integer

RANGE:

0...# of series in chart

DEFAULT:

0

SYNTAX:

void setLegendSeriesCount(int newValue);
int getLegendSeriesCount();

EXAMPLE:

setDepthAngle(0);
setDepthRadius(0);
setFootnoteDisplay(false);
setSubtitleDisplay(false);
setTitleDisplay(false);
setLegendAutomatic(true);
setLegendScroll(2);
setLegendSeriesCount(3);
setLegendSeriesStart(0);
setLegendOrient(0);
setLegendRect(new Rectangle(-15340,-2478,5948,17550));

NOTE:

This property is not available in gantt charts.

ALSO SEE:

LegendScroll, LegendSeriesStart

LegendSeriesStart

When the legend scroll bar is enabled with LegendScroll(1) or LegendScroll(2), this property defines the first series to show in the scrolled legend area.

DATA TYPE:

integer

RANGE:

0...# series in chart

DEFAULT:

0

SYNTAX:

void setLegendSeriesStart(int newValue);
int getLegendSeriesStart();

EXAMPLE:

setDepthAngle(0);
setDepthRadius(0);
setFootnoteDisplay(false);
setSubtitleDisplay(false);
setTitleDisplay(false);
setLegendAutomatic(true);
setLegendScroll(2);
setLegendSeriesCount(3);
setLegendSeriesStart(2);
setLegendOrient(0);
setLegendRect(new Rectangle(-15340,-2478,5948,17550));

NOTE:

This property is not available in gantt charts.

ALSO SEE:

LegendScroll, LegendSeriesCount

LegendTextAutofit

This property enables (true) / disables (false) automatic fitting of the legend text.

DATA TYPE:

boolean

RANGE:

true / false; true = Automatically fit legend text, false = Do not automatically fit legend text

DEFAULT:

true

SYNTAX:

void setLegendTextAutofit(boolean newValue);
boolean getLegendTextAutofit();

EXAMPLE:

setGraphType(61);
setLegendTextAutofit(false);
setFontSizeVC(getLegendText(), 1800);

ALSO SEE:

LegendAutomatic, LegendDisplay, LegendMarkerPosition, LegendReverse