Android Shinobi chart number of grid lines


#1

Hi,

I can show the gridline using the function:

yAxis.getStyle().getGridlineStyle().setGridlinesShown(true);

Now i can sixteen horizontal gridline in a chart. Can i set the number of gridlines shown, to a value such as 5?

Regards,

Victor Yeo


#2

Hi Victor,

The gridlines go hand in hand with the axis’ major tick marks. So one way of controlling the number of gridlines shown would be to set the desired major tickmark frequency on the axis.

For more fine grained control you could, instead of setting the gridlines to be shown, draw your own gridlines manually by using the ShinobiChart.OnTickMarkDrawListener callback interface.

I hoe that helps.

Kind regards,

Patrick