Each axis has major and minor ticks. The position of the ticks is determined by the current axis scale object.
Major Axis Ticks
Major ticks are displayed on the inside and the outside of the chart, and their names define the orientation they have toward the chart center. The length of the major inner and outer ticks is controlled with the OuterTickLength and InnerTickLength properties of the Axis object, respectively. By default the inner and outer tick length is set to 0.04 Model units. The following code will increase the length of the outer ticks and decrease the length of the inner ticks of the PrimaryY axis.
VB.NET | |
---|---|
|
C# | |
---|---|
|
Minor Axis Ticks
Minor ticks are drawn between major ticks on the outside of the chart. Their length can be controlled with the MinorTickLength property. By default their length is set to 0.02 Model units. The following code increases the size of the minor ticks.
VB.NET | |
---|---|
axis.MinorTickLength = 0.04F |
C# | |
---|---|
axis.MinorTickLength = 0.04f; |
Controlling the Appearance of Ticks
Both kinds of ticks are rendered as simple lines. The properties of these lines can be controlled through the OuterTickLine , InnerTickLine, and MinorTickLine properties, which give access to the LineProperties objects controlling the appearance of the respective ticks.
The following examples apply different colors to the axis ticks:
VB.NET | |
---|---|
|
C# | |
---|---|
|
Related Examples
Windows Forms: Axes\General\Ticks