Applies to

grAxis objects in Graph controls


The major grid for an axis extends from the tick marks on the axis across the data area of the graph. The minor grid lines fall between the tick marks and display when the number of divisions is 2 or greater.

The MajorGridLine property specifies the line style for the major grid.


In a painter

To set the line style for a major grid line:

  1. Display the Axis tab page of the graph control's Properties view and select the desired axis from the Axis drop-down list.

  2. Select the desired line style from the MajorGridLine drop-down list in the Major Divisions group.

In scripts

The MajorGridLine property takes a value of the LineStyle enumerated datatype.

This example specifies a dashed line for the major grid line on the Value axis of Graph gr_1:

gr_1.Value.MajorGridLine = Dash!