Phú Phú - 11 days ago 7
Android Question

How to make value on axes equidistant?

I'm working on a project with aChartEngine. I'm facing a problem that value on axes of my chart are not equidistant. It's always auto scale to fit the chart. It looks like this image:

enter image description here

I looked for solution for this problem on google, stackoverflow and document of aChartEngine http://www.achartengine.org/content/javadoc/index.html, but nothing helps.

So could you please tell me how can I programmatically set value on axes of my chart look like : -2 -1 0 1 2 3...

Answer

Finally I got my answer. I used mRenderer.setRange(new double[]{-2,2,-2,2}); and now it looks good. enter image description here

Comments