Version

Configuring Axis Orientation

By default, the UltraDataChart™ control will always draw the XAxis from the left to the right side of the chart and YAxis from the bottom to the top of the chart. However, you have the option of changing this by inverting the drawing of the individual axes using the Axis object’s IsInverted property. If you invert an axis, then the series that uses the axis will be also be inverted.

The following sample code shows all possible combination of orienting the XAxis and YAxis in the Data Chart control. Please note that only settings made in order to invert the axes are shown for clarity.

In C#:

var xAxis1 = new CategoryXAxis();
var yAxis1 = new NumericYAxis();
var xAxis2 = new CategoryXAxis();
var yAxis2 = new NumericYAxis();
var xAxis3 = new CategoryXAxis();
var yAxis3 = new NumericYAxis();
var xAxis4 = new CategoryXAxis();
var yAxis4 = new NumericYAxis();
xAxis1.IsInverted = true;
yAxis1.IsInverted = false;
xAxis2.IsInverted = false;
yAxis2.IsInverted = false;
xAxis3.IsInverted = true;
yAxis3.IsInverted = true;
xAxis4.IsInverted = false;
yAxis4.IsInverted = true;

In Visual Basic:

Dim xAxis1 As New CategoryXAxis()
Dim yAxis1 As New NumericYAxis()
Dim xAxis2 As New CategoryXAxis()
Dim yAxis2 As New NumericYAxis()
Dim xAxis3 As New CategoryXAxis()
Dim yAxis3 As New NumericYAxis()
Dim xAxis4 As New CategoryXAxis()
Dim yAxis4 As New NumericYAxis()
xAxis1.IsInverted = true
yAxis1.IsInverted = false
xAxis2.IsInverted = false
yAxis2.IsInverted = false
xAxis3.IsInverted = true
yAxis3.IsInverted = true
xAxis4.IsInverted = false
yAxis4.IsInverted = true

The following image shows the same data series in four separate UltraDataChart controls with different inverted axes combinations including no inverted axes to both XAxis and YAxis inverted.

xamDataChart Axis Orientation 01.png