Grid Lines, Tickmarks and Interlacing

  • 4 minutes to read

Chart axes allow you to modify their x- and y-axis tickmark and grid line options. You can also change the color of the interlaced color intervals on the diagram’s surface.

Tickmarks and grid lines can be major and minor:

GridLinesTickMarks

How to Customize Tickmarks

Tickmarks make the chart data easier to understand. They divide an axis into equal sections by a step whose value is determined by the special options of an axis. In addition, you can display axis labels next to the tickmars.

To access the properties of axis tickmarks at design time, select the required axis, and in the Properties window, expand the Axis2D.Tickmarks property as shown in the following image.

Tickmarks

Use the properties described below to customize the appearance of minor and major tickmarks.

The only property which affects both major and minor tickmarks is the TickmarksBase.CrossAxis property. This property draws all tickmarks across the axis.

The following properties determine the appearance of major tickmarks only:

The following properties specify the appearance of minor tickmarks only:

In addition, you can define the number of minor tickmarks to be shown between each pair of major tickmarks. To do so, set this number in the AxisBase.MinorCount property. This property also affects the number of minor grid lines.

The overall number of major tickmarks (along with the number of the major grid lines) on an axis is determined automatically when the ScaleGridOptionsBase.AutoGrid property is enabled.

How to Customize Grid Lines

Grid lines are a set of mutually-crossing vertical and horizontal lines that stretch throughout the entire chart. Visually, grid lines can be considered extensions of major tickmarks. The grid lines improves the readability of chart data.

To access the properties of grid lines at design time, select the required axis, and in the Properties window, expand the AxisBase.GridLines property as shown in the following image.

GridLines

Use the properties described below to customize the appearance of minor and major grid lines.

The following properties determine the appearance of major grid lines only:

The following properties specify the appearance of minor grid lines only:

The AxisBase.MinorCount property determines the number of minor grid lines to be shown between each pair of major grid lines. This property affects minor tickmarks and grid lines.

The overall number of major grid lines (along with the number of the major tickmarks) on an axis is determined automatically when the ScaleGridOptionsBase.AutoGrid property is enabled.

How to Make a Diagram Interlaced

In addition to tickmarks, you can enable Interlacing for the chart’s diagram from any of its axes. You can make the diagram’s background ribbed, alternating between two colors. To do this, enable the AxisBase.Interlaced property. The default interlacing color can be changed in the AxisBase.InterlacedColor property and referenced to its fill style (Axis2D.InterlacedFillStyle).

Axis_Interlaced_True

Note that the interlacing doesn’t depend on whether an axis’ grid lines or tickmarks are visible or not. Moreover, the interlacing and grid lines are maintained after the Axis2D.Visibility property is set to false. This situation is illustrated in the following image.

Interlaced_Strict

The rate at which these colors are repeated depends on the inter-related rate of both major tickmarks and grid lines. For more information on how to configure the this spacing, see the following topic: Grid Spacing.

See Also