1. How to stop scrolling of AChartEngine dynamic line graph along the y-axis?

  2. When I dynamically plot values I wish to display the recent plotted value. How to do that?

  3. I wish to plot y- axis values in range 20 to 200 and want to display only 5 values so I have used mRenderer.setYLabels(5); But, when I do so grid lines are displayed for only those values. And user will not be able to know the exact y axis co-ordinate. How to show grid lines for each value and show labels for only some values?

  4. If I manually scroll graph horizontally towards right or left, x-axis labels change. I set range as 0-10 with setXLables(2); but it changes to 0,5,10… How to control this behavior?

有帮助吗?

解决方案

These should be 4 separate questions, not numbered ones. So, I will only answer the first one of them:

You can set the min and max displayed values:

renderer.setXAxisMin(minValue);
renderer.setXAxisMax(maxValue);

If by scrolling you mean panning, then this is the way to do:

renderer.setPanEnabled(false, false);
renderer.setZoomEnabled(false, false);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top