Annotation.ShapePosition Property
Specifies the annotation position.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
AnnotationShapePosition | An AnnotationShapePosition class descendant representing the shape position type. |
Remarks
The ShapePosition property can be specified as the RelativePosition or FreePosition type.
The following table contains the various types of the annotation shape position.
The Property Values | The Example Image | Description |
---|---|---|
ShapePosition = RelativePosition | If the In this example the ConnectorLength property is specified to 70 and the RelativePosition.Angle property to 45. | |
ShapePosition = FreePosition | The In this example, the annotation is docked to a Chart control. The HorizontalAlignment property is specified as Right, the VerticalAlignment as Top. The Margin property is defined as (0, 90, 50, 0). |
Example
This example demonstrates how to anchor an annotation to a series point.
To do this, specify the SeriesPointAnchorPoint.SeriesPoint property.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-anchor-annotations-to-various-points-t378313.
<dxc:Annotation Content="Annotation #1">
<dxc:Annotation.AnchorPoint>
<dxc:SeriesPointAnchorPoint SeriesPoint="{Binding ElementName=seriesPoint}"/>
</dxc:Annotation.AnchorPoint>
<dxc:Annotation.ShapePosition>
<dxc:RelativePosition Angle="60"
ConnectorLength="50"/>
</dxc:Annotation.ShapePosition>
</dxc:Annotation>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ShapePosition property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.