Annotation.AnchorDataPoint 属性

定义

获取或设置批注所定位到的数据点。Gets or sets the data point to which an annotation is anchored.

public:
 virtual property System::Windows::Forms::DataVisualization::Charting::DataPoint ^ AnchorDataPoint { System::Windows::Forms::DataVisualization::Charting::DataPoint ^ get(); void set(System::Windows::Forms::DataVisualization::Charting::DataPoint ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AnchorPointValueConverter))]
public virtual System.Windows.Forms.DataVisualization.Charting.DataPoint AnchorDataPoint { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AnchorPointValueConverter))>]
member this.AnchorDataPoint : System.Windows.Forms.DataVisualization.Charting.DataPoint with get, set
Public Overridable Property AnchorDataPoint As DataPoint

属性值

DataPoint

批注所定位到的 DataPoint 对象。A DataPoint object to which an annotation is anchored.

属性

注解

批注将锚定到指定数据点的 X 和 Y 值,并自动使用与数据点相同的轴坐标。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.

若要使批注相对于定位点自动定位,请确保 X 将其和 Y 属性设置为 NaNTo automatically position the annotation relative to the anchor point, make sure its X and Y properties are set to NaN. AnchorAlignment属性可用于将批注的自动位置对齐方式更改为定位点。The AnchorAlignment property can be used to change the automatic position alignment of the annotation to the anchor point. AnchorOffsetXAnchorOffsetY 属性可用于添加额外的间距。The AnchorOffsetX and AnchorOffsetY properties may be used to add extra spacing.

使用此属性时,请确保 AnchorXAnchorY 属性设置为 double.nan,因为它们的优先级相同。When you use this property, make sure the AnchorX and AnchorY properties are set to Double.NaN, as they have precedence.

将此值设置为 null 以禁用到数据点的批注定位。Set this value to null to disable annotation anchoring to a data point.

适用于