This documentation is archived and is not being maintained.

Annotation.AnchorDataPoint Property

Gets or sets the data point to which an annotation is anchored.

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

public virtual DataPoint AnchorDataPoint { get; set; }

Property Value

Type: System.Web.UI.DataVisualization.Charting.DataPoint
A DataPoint object to which an annotation is anchored.

The annotation is anchored to the X and Y values of the specified data point, and automatically uses the same axes coordinates as the data point.

To automatically position the annotation relative to the anchor point, make sure its X and Y properties are set to NaN. The AnchorAlignment property can be used to change the annotation's automatic position alignment to the anchor point. The AnchorOffsetX and AnchorOffsetY properties can be used to add extra spacing.

When you use this property, make sure the AnchorX and AnchorY properties are set to NaN, as they have precedence.

Set this value to null to disable annotation anchoring to a data point.

.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.