How to animate diagrams with jQuery and jQplot (updating data)

冷暖自知 提交于 2019-12-02 19:47:57

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!