Phú Phú - 1 year ago 117
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, 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 Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download