How to update a graph or chart dynamically in android?

I use the AChartEngine library for graphs

I can create a schedule

GraphicalView view = ChartFactory.getLineChartView(mContext, mXYDataSet, mXYMultipleRenderer); 

But when the view has already been created, there is no method that performs adding / removing points on the chart inside the GraphicalView class.

In my project, I need to dynamically update the chart with a new dataset every second. Is there any solution?

+4
source share
1 answer

In the AChartEngine demo application you can try the "Embedded line chart Demo", where you can dynamically update the chart. The code used by this demo is the XYChartBuilder class, and the source for it is included in AChartEngine, so you will probably find the answer in the source code for this class.

0
source

Source: https://habr.com/ru/post/1383871/


All Articles