EJSC.PieSeries Property Examples
Properties Demonstrated
- Standard EJSC.PieSeries Properties
Desired Result
Default EJSC.PieSeries Settings
Properties Demonstrated
- defaultColors
- treeLegend
Desired Result
This chart will have a new set of colors defined as the pool of colors to be used when creating the pie pieces, and show its items in the legend in a treeview format.
Source Code
- <script type=”text/javascript”>
- var chart = new EJSC.Chart(“myChart1a”, {
- show_legend: false
- });
- chart.addSeries(new EJSC.PieSeries(
- new EJSC.ArrayDataHandler([[3,”Widgets”],
- [7,”Doodads”],[4,”Thingamagigs”],
- [10,”Whatchamacallits”],[2,”Gizmos”],
- [5,”Thingies”]])
- ));
- </script>
Source Code
- <script type=”text/javascript”>
- var chart = new EJSC.Chart(“myChart1b”, {
- });
- chart.addSeries(new EJSC.PieSeries(
- new EJSC.ArrayDataHandler([[3,”Widgets”],
- [7,”Doodads”],[4,”Thingamagigs”],
- [10,”Whatchamacallits”],[2,”Gizmos”],
- [5,”Thingies”]]
- ),
- {
- treeLegend: true ,
- defaultColors: [
- ‘rgb(255,140,0)’, //DarkOrange
- ‘rgb(178,34,34)’, //FireBrick
- ‘rgb(153,50,204)’, //DarkOrchid
- ‘rgb(255,255,0)’, //Yellow
- ‘rgb(112,219,147)’, //AquaMarine
- ‘rgb(35,107,142)’ //SteelBlue
- ]
- }
- ));
- </script>