Reputation: 2115
I'm trying to create a highstock chart which:
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.
Upvotes: 1
Views: 2754
Reputation: 12238
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:
chart.series[0].addPoint([x, y], true, true);
chart.series[2].addPoint([x, y], true, true);
or, a better method would be to target your series by their name.
Upvotes: 4