问题
Is there any way to limit the scroll area of AChartEngine? I have a graph of stats for a team where the X-axis represents time and the Y-axis represents score and it doesn't make sense to have negative for either. I'd like to make it so that the farthest that the user can scroll down and to the left would put the origin in the bottom left corner of the screen. I appreciate any assistance.
回答1:
Try using setPanLimits() method ..
double[] panLimits={0,10,0,50}; // [panMinimumX, panMaximumX, panMinimumY, panMaximumY]
mRenderer2.setPanLimits(panLimits);
where mRenderer2
is XYMultipleSeriesRenderer
.
来源:https://stackoverflow.com/questions/22239371/achartengine-scroll-area