You must be logged in to post your query.
Home › Forums › Chart Support › Changing color of a pie slice
Tagged: pie slice colors
How can I change the color of a slice in an already rendered pie graph?
@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
You must be logged in to reply to this topic. Login/Register