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.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)

[BindableAttribute(true)]
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.5.2, 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft