GraphView and resetData

▼魔方 西西 提交于 2019-12-02 01:39:01

I guess by reset you mean to clear all the graph and then draw something new again? Then you could use graphView.removeAllSeries();.

one way is to remove the graphview View and completely recreate it.

The other way is to use the realtime feature. you should use the latest version of graphview directly from github. You can change the data in the series using resetData or appendData. Take a look into the GraphView-Demo project on github.

exampleSeries1.resetData(new GraphViewData[] {
        new GraphViewData(1, getRandom())
        , new GraphViewData(2, getRandom())
        , new GraphViewData(2.5, getRandom()) // another frequency
        , new GraphViewData(3, getRandom())
        , new GraphViewData(4, getRandom())
        , new GraphViewData(5, getRandom())
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!