Axis Appearance

Alignment

The Alignment property can be set to three different settings: Center, Near, or Far. Setting the alignment to center centers the axis title in comparison to the ChartArea. Setting the alignment to Near places the axis title to the left side of the ChartArea. Setting the alignment to Far places the axis title to the right side of the Chart Area.

Font

The Font size and style for the axis title can be changed by manipulating the Font object of the axis. To access the font properties at design time click the ellipsis next to the Font node or expand the Font node under the axis object in the Visual Studio Properties window. To programmatically modify the Axis font properties, enter the following:

      Visual Basic

      C#

ForeColor

The ForeColor property changes the color of the axis line, tick marks, and title. To change the ForeColor set the Forecolor property to a valid color in code, or the property can also be accessed at design time under the Axis object in the Visual Studio Properties window.

Thickness

The thickness of the axis is determined by the Thickness property. The value is specified in pixels. Axes with a zero thickness value are fully drawn except for the axis line itself.

The following chart displays the Y-Axis with its Thickness property set to zero:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.