This topic is locked

How to change colors of individual slices in pie/doughnut charts

3/22/2017 1:11:38 PM
PHPRunner Tips and Tricks
admin

Use Javascript ChartModify event and here is the sample code:

var palette = anychart.palettes.distinctColors();

palette.items(["#64B5F6", "#2374B8", "#97BDC1", "#FFD54F", "#EF6C00", "#0AB4DE", "#CFAE83"]);

chart.palette(palette);


If your pie chart has more slices than number of colors you specified, colors will be repeated.