ChartAxisCrossesAt Property

Specifies where on the perpendicular axis the axis crosses.

Namespace:  Aspose.Words.Drawing.Charts
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.7.0


public double CrossesAt { get; set; }

Property Value

Type: Double


The property has effect only if Crosses are set to Custom. It is not supported by MS Office 2016 new charts.

The units are determined by the type of axis. When the axis is a value axis, the value of the property is a decimal number on the value axis. When the axis is a time category axis, the value is defined as an integer number of days relative to the base date (30/12/1899). For a text category axis, the value is an integer category number, starting with 1 as the first category.


Shows how to get a graph axis to cross at a custom location.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert a column chart, which is populated by default values
Shape shape = builder.InsertChart(ChartType.Column, 450, 250);
Chart chart = shape.Chart;

// Get the Y-axis to cross at a value of 3.0, making 3.0 the new Y-zero of our column chart
// This effectively means that all the columns with Y-values about 3.0 will be above the Y-centre and point up,
// while ones below 3.0 will point down
ChartAxis axis = chart.AxisX;
axis.AxisBetweenCategories = true;
axis.Crosses = AxisCrosses.Custom;
axis.CrossesAt = 3.0;

doc.Save(ArtifactsDir + "Charts.AxisCross.docx");

See Also