Skip to main content
All docs
V25.1
  • 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.v25.1.Core.dll

    NuGet Package: DevExpress.Spreadsheet.Core

    Declaration

    double CrossesAt { get; set; }

    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.

    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.Custom;
    chart.PrimaryAxes[0].CrossesAt = -10;
    

    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