This documentation is archived and is not being maintained.

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)

[PersistenceModeAttribute(PersistenceMode::Attribute)]
[BindableAttribute(true)]
public:
virtual property double Crossing {
	double get ();
	void set (double value);
}

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

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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