ColorMode

This property sets the color mode to be used in the graph (automatic, color-by-series, color-by-group, automatic riser shading, automatic riser gradient color). For 3D Surface graphs, automatic mode (0) will cause the graph to be colored by height. For bar, line, and area graphs, automatic mode (0) will color the graph by series if there is more than one series or by groups if there is only one series.

Syntax:

setColorMode(value);
value = getColorMode();

where:

value

Can be one of the following:

0 for Automatic. Use the group as the series if there is only one series. 3D Connected Series Ribbon and Areas are colored by series. 3D Group Ribbon and Areas are colored by group. 0 is the default value.

1 for Color by Series.

2 for Color by Group.

3 for Color by Height.

4 for automatic riser shading. Makes each group of risers a lighter or darker shade of the previous group. Use in conjunction with setSeriesLooping() and setAutoColorLerpFactor(). For more information, see Risers and Markers.

5 for automatic riser gradient coloring. Creates a gradient color effect between the risers. Use in conjunction with setAutoColorGradientStartColor() and setAutoColorGradientEndColor(). For more information, see Risers and Markers.

Example:

setDepthRadius(0);
setViewableGroups(4);
setViewableSeries(4);
setDataScrollerPresenceGroups(0);
setLegendDisplay(false);
setO1LabelDisplay(false);
   setColorMode(2);

bar graph

setColorMode(1);

bar graph

Note: When color by group (setColorMode(2);) is selected, the legend is always automatically turned off.

See ExactColorByHeight.


WebFOCUS