How to stop AChartEngine dynamic line chart scrolling along y axis?

I set the minimum range for the values ​​of the Y axis, but the graph can scroll beyond the values ​​that impede the appearance of the graph. I want to control / stop the scrolling of the chart along the y axis. How can i do this?

+4
source share
3 answers

You need to specify what kind of devious panning is available for: mRenderer.setPanEnabled(boolean enabledX, boolean enabledY)

Click here for more details.

+9
source

use the x and y axes to lock the scroll, depending on our needs, you can specify logical values

 render.setPanEnabled(false, false); 
+6
source

use the setPanLimits method.

mRenderer.setPanLimits (new double [] {0,10,0,5});

this code will disable panning beyond 0 to the left, 10 to the right on the x-axis and above 0 down and 5 on the y-axis.

+1
source

All Articles