How to set major and minor grid lines using Achartengine on Android?

125 views Asked by At

I want to build chart with major and minor grids as the picture below, yet I can’t find API to implement this, can anyone help with how I can achieve this using Achartengine on Android? enter image description here

1

There are 1 answers

0
Ankur Aggarwal On

AFAIK, AChartEngine does not support Major and Minor gridlines. Only one set of gridlines can be enabled, though you may enable/disable x and y gridlines separately.

renderer.setShowGridX(true);
renderer.setShowGridY(false);

If you absolutely need major/minor gridlines, I suggest you try Sfchart. It does support major and minor axis :

chart.getSecondaryAxis().setShowMajorGridLines(true);
chart.getSecondaryAxis().setShowMinorGridLines(true);

However, please make sure to check their licensing terms before using.