Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to dynamically change borderColor of series in highcharts?

I am using following code to change the bordercolor of series, but it's not working out.

chart.options.plotOptions.series.borderWidth = '3px';
chart.options.plotOptions.series.borderColor = '#FF0000';

jsFiddle

Can anyone please suggest? Thanks.

like image 889
Pooja Bansal Avatar asked Jan 23 '26 12:01

Pooja Bansal


1 Answers

you can use series.update() method as shown below, this method updates the options and data for the series. You have to run this method with each and every method to get the settings applied to all the series

chart.series[0].update({ borderWidth: 3, borderColor: '#FF0000' })

Updated your js fiddle here

I hope this is the solution you are looking for.

like image 171
Strikers Avatar answered Jan 25 '26 00:01

Strikers