Axis.CrossesAt Property
Specifies a point on the perpendicular axis at which the current and perpendicular axes should cross.
Namespace: DevExpress.Spreadsheet.Charts
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
#Declaration
#Property Value
Type | Description |
---|---|
Double | The intersection point on the perpendicular axis. |
#Remarks
Set the Axis.CrossType property to Custom and use the CrossesAt property to specify a custom intersection point for the current axis and the associated perpendicular axis. If you need to specify the intersection point on the category axis, use an integer as the category number, starting with 1 as the first category.
The code below creates a simple line chart and specifies that the chart’s category axis crosses the value axis at -10.
// 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.Custom;
chart.PrimaryAxes[0].CrossesAt = -10;
Important
The Crosses