Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

Axis.CrossType Property

Specifies where the current axis crosses the perpendicular axis.

Namespace: DevExpress.Spreadsheet.Charts

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

Declaration

AxisCrossType CrossType { get; set; }

Property Value

Type Description
AxisCrossType

An enumeration member that specifies the axis intersection point.

Remarks

When you set the CrossType property to Min or Max, the Spreadsheet evaluates the intersection point with the associated axis based on its orientation (AxisScaling.Orientation) and changes the position of the current axis (Axis.Position) accordingly.

The code below creates a simple line chart and specifies that the chart’s category axis crosses the value axis at the minimum y-value.

Line chart that visualizes average night temperatures

// Create a line chart and specify its location.
var chart = worksheet.Charts.Add(ChartType.LineMarker, worksheet["B2:C14"]);
chart.TopLeftCell = worksheet.Cells["E2"];
chart.BottomRightCell = worksheet.Cells["K14"];

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

// Specify the axis intersection point.
chart.PrimaryAxes[0].CrossType = AxisCrossType.Min;

Set the CrossType property to Custom and use the Axis.CrossesAt property to specify a custom intersection point for the current axis and the associated perpendicular axis.

Important

The CrossesAt property is fully supported by Microsoft Excel only. The Spreadsheet control cannot render an axis inside the plot area. The control allows you to change the axis position to the opposite value only. For example, you can display the primary value axis in a line chart to the left (default) or to the right of the plot area. Refer to the Axis.Position property for details.

See Also