Export (0) Print
Expand All

Axis.Crossing Property

Gets or sets the location at which an axis is crossed by its associated axis.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

[BindableAttribute(true)]
[PersistenceModeAttribute(PersistenceMode.Attribute)]
public virtual double Crossing { get; set; }

Property Value

Type: System.Double
A double value that represents where an axis is crossed by its associated axis. The default value is NaN.

Setting this property for a primary axis will determine where the other primary axis crosses it, and similarly setting it for a secondary axis will determine where the other secondary axis crosses it. For example, setting the Crossing property of the primary X-axis determines where the primary Y-axis will cross it.

Four modes can be used for the Crossing property of an axis:

  • "Auto", which means that the crossing value will be set to the minimum or maximum value for the relevant axis. If the axis is primary, the value will be its minimum value, if the axis is secondary it will its maximum value. To set to "Auto" at run time, use a NaN value.

  • "Minimum", which means the crossing value of the axis will be its minimum value. To set to "Minimum" at run-time use a MinValue value.

  • "Maximum", which means the crossing value of the axis will be its maximum value. To set to "Maximum" at run-time use a MaxValue value.

  • A specified double value that is between the minimum and maximum values for the relevant axis. If the crossing value is less then minimum value, or the crossing value is greater than maximum value, an exception will be thrown.

When a non-default crossing value is used, the labels and tick marks of the axis may or may not follow the crossing axis, depending on the IsMarksNextToAxis property setting. By default they will move with the crossing axis.

.NET Framework

Supported in: 4.6, 4.5, 4
Show:
© 2015 Microsoft