0

I have an AngularJS application in which I am using highcharts-ng version 0.0.86. I am trying to implement a feature where the user will set the color of the series after the chart is generated. I am trying to update the series color(from the browser console) using the following code:

$("#myHighChart").highcharts().series[0].color='#ffffff'
$("#myHighChart").highcharts().redraw() 

Calling the redraw() method does not update the color of the series.

What is the correct way of updating the color of series?

halfer
  • 19,824
  • 17
  • 99
  • 186
Meet
  • 15
  • 5

1 Answers1

0

You can update the series color by following code

$(".chartColumn").highcharts().series[0].userOptions.color='#FF0000'
$(".chartColumn").highcharts().series[0].update()

This will update the color of the series as well as the data point.

halfer
  • 19,824
  • 17
  • 99
  • 186
Meet
  • 15
  • 5