Reputation: 44085
I am adding a new different point to each of two serieses in a chart similar to this example. If I have only one series, it's animated but for two serieses, it's not animated anymore. The x axis labels scroll smoothly though. Is there a way to animate them or is this a limitation?
Upvotes: 1
Views: 1155
Reputation: 49
you can redraw the chart after a certain amount points have been added.
series1.addPoint([x, y1], false, true);
series2.addPoint([x, y2], false, true);
chart.redraw();
Upvotes: 0
Reputation: 108537
The two animations are tripping each other up. Add each point without redrawing, then redraw the chart.
series1.addPoint([x, y1], false, true); //false is to not redraw
series2.addPoint([x, y2], false, true);
chart.redraw();
See this fiddle.
EDIT:
You can also use
series1.addPoint([x, y1], false, true); //false is to not redraw
series2.addPoint([x, y2], true, true);
and you don't need to chart.redraw();
Upvotes: 2