I am \"animating\" diagrams over time by changing the data and redrawing them.
// initialization
var data = ...
var targetPlot = $.jqplot(\'#diagram\', data, dia
This is the way I found after lots of investigation. I am writing this down to help someone reading this question.
The correct place to update the data is in the series property, after updating the data you can redraw the plot:
targetPlot.series[0].data = myData;
targetPlot.redraw();
If your axis changed, then you can rescale them by using replot()
instead of redraw()
:
targetPlot.replot({resetAxes:true});
This is much faster than redrawing a new plot every time.