ChartAxisReverseOrder Property

Returns or sets a flag indicating whether values of axis should be displayed in reverse order, i.e. from max to min.

Namespace:  Aspose.Words.Drawing.Charts
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool ReverseOrder { get; set; }

Property Value

Type: Boolean
Remarks
The property is not supported by MS Office 2016 new charts. Default value is false.
Examples
Shows how to insert chart using the axis options for detailed configuration.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert chart.
Shape shape = builder.InsertChart(ChartType.Column, 432, 252);
Chart chart = shape.Chart;

// Clear demo data.
chart.Series.Clear();
chart.Series.Add("Aspose Test Series",
    new[] { "Word", "PDF", "Excel", "GoogleDocs", "Note" },
    new double[] { 640, 320, 280, 120, 150 });

// Get chart axes
ChartAxis xAxis = chart.AxisX;
ChartAxis yAxis = chart.AxisY;

// For 2D charts like the one we made, the Z axis is null
Assert.Null(chart.AxisZ);

// Set X-axis options
xAxis.CategoryType = AxisCategoryType.Category;
xAxis.Crosses = AxisCrosses.Minimum;
xAxis.ReverseOrder = false;
xAxis.MajorTickMark = AxisTickMark.Inside;
xAxis.MinorTickMark = AxisTickMark.Cross;
xAxis.MajorUnit = 10;
xAxis.MinorUnit = 15;
xAxis.TickLabelOffset = 50;
xAxis.TickLabelPosition = AxisTickLabelPosition.Low;
xAxis.TickLabelSpacingIsAuto = false;
xAxis.TickMarkSpacing = 1;

// Set Y-axis options
yAxis.CategoryType = AxisCategoryType.Automatic;
yAxis.Crosses = AxisCrosses.Maximum;
yAxis.ReverseOrder = true;
yAxis.MajorTickMark = AxisTickMark.Inside;
yAxis.MinorTickMark = AxisTickMark.Cross;
yAxis.MajorUnit = 100;
yAxis.MinorUnit = 20;
yAxis.TickLabelPosition = AxisTickLabelPosition.NextToAxis;
See Also