I’m trying to create a highstock chart which:
- Renders an initial chart with one series
- After an event (button click) adds another series
- Dynamically get’s updated by adding points (to both series).
1 and 2 work, but adding points to the newly (dynamically) added series doesn’t seem to work, see: http://jsfiddle.net/albertsikkema/KGTBB/1/
When I add the series at chart creation time adding points work, so I’m guessing it has something to do with how the series is added.
The problem is that your navigator is an object within chart.series.
If you console log chart.series you will see that:
So you are trying to addPoints onto the navigator series, instead do:
or, a better method would be to target your series by their name.