Version

Configuring Axis Crossing

In the UltraDataChart™ control, you can use the CategoryXAxis object’s CrossingAxis and CrossingValue properties to change where the XAxis crosses the YAxis. The CrossingAxis property must be bound to the NumericYAxis using the ElementName attribute and the CrossingValue must be set to the value at which you want the XAxis to cross YAxis. The following can be applied to the NumericYAxis object’s CrossingAxis and CrossingValue properties to change where the YAxis crosses the XAxis.

The following code example shows how to set axis crossing values for CategoryXAxis and NumericYAxis in the Data Chart control.

In C#:

var yAxis = new NumericYAxis();
var xAxis = new CategoryXAxis();
xAxis.CrossingAxis = yAxis;
yAxis.CrossingAxis = xAxis;
xAxis.CrossingValue = 100;
yAxis.CrossingValue = 20;
xAxis.LabelLocation = AxisLabelsLocation.InsideBottom;
yAxis.LabelLocation = AxisLabelsLocation.InsideLeft;

In Visual Basic:

Dim yAxis As New NumericYAxis()
Dim xAxis As New CategoryXAxis()
xAxis.CrossingAxis = yAxis
yAxis.CrossingAxis = xAxis
xAxis.CrossingValue = 100
yAxis.CrossingValue = 20
xAxis.LabelLocation = AxisLabelsLocation.InsideBottom
yAxis.LabelLocation = AxisLabelsLocation.InsideLeft

The following image shows how the UltraDataChart control might look with the axis crossing values set for CategoryXAxis and NumericYAxis.

xamDataChart Axis Crossing 01.png