EJSC.PieSeries.setDefaultColors

See Also: Using Colors

Top  Previous  Next

 

Definition

 

void setDefaultColors( array colors, boolean reload )

 

Description

 

Set the array of default colors available for pie pieces.

 

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

 

If onPieceNeedsColor 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

];

               

myPieSeries.setDefaultColors(colors, true);