EJSC.BarSeries.setDefaultColors

See Also: Using Colors

Top  Previous  Next

 

Definition

 

void setDefaultColors( array colors, boolean reload )

 

Description

 

Set the array of default colors available for bar series bars.

 

If reload = true the bars (if loaded) will pull their colors from the given color array and the chart will be redrawn.

 

If onBarNeedsColor is assigned, this method will ignore that event and load the colors from the array.

 

Example

 

var colors = [

               "rgb('0,0,0')",                                // black

               "rgb(255,0,0)",                                // red

               "rgb("0,255,0)",                                // green

               "rgb("0,0,255)",                                // blue

               "rgb("255,255,255)"                // white

];

               

myBarSeries.setDefaultColors(colors, true);