The chart automatically sets up the axis with both major and minor ticks. Customizing the tick spacing or attributes is as easy as manipulating a set of properties.
The TickMajor and TickMinor properties set the state of the Axis' tick marks. This property can be set to any of the TickMarksEnum values.
These values set where and if the tick marks will be displayed:
Value | Description |
---|---|
TickMarksEnum.None | No tick marks along axis. |
TickMarksEnum.Cross | Tick marks cross over axis. |
TickMarksEnum.Outside | Tick marks located outside chart area on axis. |
TickMarksEnum.Inside | Tick marks located inside chart area on axis. |
The AutoMajor and AutoMinor properties set whether the tick marks are to be automatically configured by the chart. When both these properties are set to True, the chart uses the current data to logically place the major and minor tick marks. When the AutoMajor property is true, its not necessary to enable overlap for axis annotations.
The UnitMajor and UnitMinor properties set the units by which the ticks will be spaced. When the UnitMajor property is set, the UnitMinor property is automatically set by the chart to half the UnitMajor value. Although the chart automatically sets the UnitMinor property, it also can be manually changed to a different value.
You can increase the length of the Major and Minor tick marks using the TickFactorMajor and TickFactorMinor properties. Tick marks are sized based on the thickness of the axis line as well as the tick factor. Doubling the tick factor doubles the length of the axis tick mark. Values are limited to integers from 1 to 20. Values outside of this range are ignored.
The following chart image has the TickFactorMajor property set to 5. This makes the tick length for the major tick marks five times longer.
The following chart image has the TickFactorMinor property set to 5. This makes the tick length for the minor tick marks five times longer.