Variable number of gridlines