Home Forums Chart Support Changing color of a pie slice Reply To: Changing color of a pie slice

#43042

@xliff,

You can change the color of a slice in the pie chart after it is rendered by updating the color of the corresponding datapoint in the chart options as shown in the code snippet below:

chart.options.data[0].dataPoints[3].color = "red";
chart.render();

Please take a look at this documentation page for step-by-step tutorial on updating chart options.


Thangaraj Raman
Team CanvasJS