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:
Dim f As Font = New Font("Arial", 8, FontStyle.Bold)
C1Chart1.ChartArea.AxisX.Font = f
· C#
Font f = new Font("Arial", 8, FontStyle.Bold);
C1Chart1.ChartArea.AxisX.Font = f;
· Delphi
var
f: Font;
begin
f := new Font('Arial', 8, FontStyle.Bold);
C1Chart1.ChartArea.AxisX.Font := f;
end;
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.
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |