Tobias Schittkowski
Tobias Schittkowski

Reputation: 2251

HighCharts: how to update bar color when updating the point value

I use the "update" command to refresh the value of a point in my series:

mychart.series[0].data[i].update(sigvalue);

Now I would like to update the color of this column/point as well. I tried

mychart.series[0].data[i].color = "#FF0000";

But that did not work...

Upvotes: 0

Views: 616

Answers (1)

Sebastian Bochan
Sebastian Bochan

Reputation: 37588

Color should be changed by attr() function.

http://jsbin.com/ubapaz/10/edit

    $('#test').click(function() {
chart.series[0].data[4].graphic.attr("fill","#ff0000");
    });

API here for your reference.

Upvotes: 2

Related Questions