Minor Grid Lines?


There are some pretty nice ways to style the major grid lines, as well as major and minor tick marks. But I’m having trouble finding how to show or style minor grid lines. Is that not an option? Thanks!


Hi Justin,

We currently don’t offer a way to customise the minor grid lines on our charts. We have made a note of this and put it on our list of features to investigate.

kind Regards,

Andrew Polkinghorn.


I understand you can’t customise minor grid lines, but is there a propoerty available to show minor grid lines?  I can get the minor tick marks to appear, but not the lines.


Hi Sully,

There isn’t currently a way to add minor grid lines to your chart. The fact that minor tick style uses an SChartTickStyle object (which has properties that makes it seem like this is possible) is confusing and I’ve raised this as an issue in our product backlog. Depending on how you want to style your chart you might still be able to acheive this effect.

You could increase the major tick frequency of your major tick marks to what you want your minor tick frequency to be. This would make the chart render major grid lines at the locations you were intending your minor gridlines to go. You could then use the alterTickMark: delegate method to hide any tick labels unless they are over the point where you wanted your major ticks to be. The only downside with this method is that your major and minor grid lines will be the same style.

If you want differently styled major and minor grid lines I’m afraid you’ll have to add, and manage the positioning of the gridlines (long thin UIViews with a background colour) yourself. The major grid lines on the chart are just UIViews placed on the chart.canvas.overlay, so there’s no reason you couldn’t hook into the panning & zooming delegate methods, create and position your own grid lines. Although I suspect this might be a bit of work on your part!

I’ve raised this as a feature request, the more popular a feature is the sooner it’ll be brought into our development schedule, so if anyone else is also interested in this feature - let us know!

Jan Akerman