Annotations
- 3 minutes to read
This topic describes how to create and customize annotations, and anchor them to various chart elements. It also explains the general functionality of annotations.
You can create text and image annotations. To do this, create instances of the TextAnnotation and ImageAnnotation classes, respectively.
You can access, manage and customize all annotations created in a chart control from its WebChartControl.AnnotationRepository property.
You can also access annotations quickly at design time. To do this, click the chart control’s smart tag, and then select Annotations… in the ChartControl Tasks list (see the image below).
This invokes the Annotations Collection Editor.
To create an annotation, click the Add button in the annotations editor, select the annotation type in the Choose Annotation Type dialog, and click OK.
The chart control creates an annotation allowing you to customize its layout, appearance and behavior.
Depending on which anchor point type the Annotation.AnchorPoint property value is set to, you can create text or image annotations anchored to a chart, pane, or series point.
Anchor Point Type | Description |
---|---|
Chart Anchoring | If the Annotation. Then, you can use the Chart These coordinates position an annotation absolutely, meaning that the anchor point does not change when the chart is resized. For a step-by-step tutorial, refer to the following help topic: How to: Create an Image Annotation Anchored to a Chart or Pane. |
Pane Anchoring | If the Annotation. Then, you can specify the pane to which the annotation should be anchored (from the Pane If the pane to which an annotation is anchored is removed, the annotation is removed as well. For a step-by-step tutorial, refer to the following help topic: How to: Create an Image Annotation Anchored to a Chart or Pane. |
Series Point Anchoring | If the Annotation. Then, you can specify the series point to which the annotation should be anchored (from the Series If the series point to which an annotation is anchored is removed, the annotation is removed as well. For a step-by-step tutorial, refer to the following help topic: How to: Create a Text Annotation Anchored to a Series Point. |