Skip to main content

AxisScaling.Orientation Property

Gets or sets the orientation of the axis on the chart.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v23.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

AxisOrientation Orientation { get; set; }

Property Value

Type Description
AxisOrientation

An AxisOrientation enumeration value specifying the axis orientation.

Available values:

Name Description
MinMax

Specifies that the axis must be displayed in the usual order, so the axis starts at the minimum value and ends at the maximum value.

MaxMin

Specifies that the axis must be reversed, so the axis starts at the maximum value and ends at the minimum value.

Remarks

Note

The Position property is ignored if the AxisScaling.Orientation property is specified.

Example

The example below demonstrates how to create a chart and use the AxisScaling.Orientation property to reverse the category axis orientation, so the values on the axis are displayed from maximum to minimum.

View Example

Worksheet worksheet = workbook.Worksheets["chartTask3"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Create a chart and specify its location.
Chart chart = worksheet.Charts.Add(ChartType.ColumnClustered, worksheet["B3:C5"]);
chart.TopLeftCell = worksheet.Cells["H2"];
chart.BottomRightCell = worksheet.Cells["N14"];

// Reverse the category axis.
chart.PrimaryAxes[0].Scaling.Orientation = AxisOrientation.MaxMin;

// Hide the legend.
chart.Legend.Visible = false;

The following code snippets (auto-collected from DevExpress Examples) contain references to the Orientation property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also