Joshua Foxworth
Joshua Foxworth

Reputation: 1397

Highcharts - change pie slice color on existing chart

I have a pie chart that already exists. I need to change the color of a specific slice. I have tried ...

chart.series[0].data[4].graphic.attr({ fill: '#FF0000' });

But this only changes the color temporarily until the item is hovered over. I have also tried the normal changing of the options method.

How do I change it for good?

Upvotes: 0

Views: 1272

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

Just use point.update method, like this:

chart.series[0].data[4].update({ color: '#FF0000' });

Demo.

Upvotes: 1

Related Questions