2
votes

I have implemented a bar graph using AChartEngine. I have added all the required values to the dataset as an XYSeries.
The graph is drawn with the first 10 bars drawn when the app is started.
I want to programmatically move the graph to a point further on the X-axis i.e I want to move the graph programmatically to display bars 25-35 or some other bars on X-axis.
Could someone please tell me how this can be achieved?

1

1 Answers

3
votes

You first need to modify the visible range for the X axis:

renderer.setXAxisMin(25);
renderer.setXAxisMax(35);

Then, just call repaint() on your chart view:

chartView.repaint();