Reputation: 5294
I have a requirement where I need to change connectNulls back and forth on a highchart.
unfortunately chart.options.plotOptions.series.update({ connectNulls: true });
results in
(index):73 Uncaught TypeError: chart.options.plotOptions.series.update is not a function at (index):73
here is the fiddle.
http://jsfiddle.net/d5dbt221/3/
Upvotes: 3
Views: 3175
Reputation: 5803
You are accessing elements that does not exist.
To set a single series to connectNulls
you can do this(where 0 is the series index):
chart.series[0].update({ connectNulls: true});
Working example: http://jsfiddle.net/ewolden/d5dbt221/9/
Or alternatively, if want to set all series:
chart.update({ plotOptions: { series: {connectNulls: true }}});
Working example: http://jsfiddle.net/ewolden/d5dbt221/11/
Upvotes: 7