Version

Configuring Axis Label Settings

In the UltraDataChart™ control, you can change the location, rotation angle, margin, horizontal/vertical alignment, visibility, and appearance of the axis label using the following properties of an Axis objects.

Property Name Property Type Description

String

Determines data mapping (category axis) and formatting (all axis) of labels

double

Determines angle rotation of axis labels

double

Determines empty space that extents between axis labels and the axis main line

FontFamily

Determines font of axis labels

HorizontalAlignment

Determines horizontal alignment of labels on CategoryYAxis and NumericYAxis only

VerticalAlignment

Determines vertical alignment of labels on CategoryXAxis and NumericXAxis only

Determines location of axis labels in relation to axis main line and chart plot area

Visibility

Determines whether or not axis labels are visible

Brush

Determines text color of axis labels

The following sample code shows how to change the location, orientation angle, and appearance of the axis label on CategoryXAxis and NumericYAxis in the UltraDataChart control.

In C#:

var yAxis = new NumericYAxis();
var xAxis = new CategoryXAxis();
xAxis.Label = "Date";
xAxis.LabelLocation = AxisLabelsLocation.OutsideBottom;
xAxis.LabelAngle = 45;
xAxis.LabelExtent = 40;
yAxis.LabelLocation = AxisLabelsLocation.OutsideRight;
yAxis.LabelAngle = -30;
yAxis.LabelExtent = 40;

In Visual Basic:

Dim yAxis As New NumericYAxis()
Dim xAxis As New CategoryXAxis()
xAxis.Label = "Date"
xAxis.LabelLocation = AxisLabelsLocation.OutsideBottom
xAxis.LabelAngle = 45
xAxis.LabelExtent = 40
yAxis.LabelLocation = AxisLabelsLocation.OutsideRight
yAxis.LabelAngle = -30
yAxis.LabelExtent = 40

The following image shows how the UltraDataChart control might look with custom label settings for CategoryXAxis and NumericYAxis.

xamDataChart Axis Label Settings 01.png