Skip to content Skip to sidebar Skip to footer

Graphview And Resetdata

please help me, I use the GraphView library (http://www.jjoe64.com/p/graphview-library.html), it works. But i don't understand how to reset previous data. Method redrawAll() does n

Solution 1:

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

Solution 2:

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())
});

Post a Comment for "Graphview And Resetdata"