Annotations are explanatory notes that are attached to various chart
elements, the most common being data points.
Annotations can:
Microsoft Chart Control for .NET Framework comes with numerous annotation types and styles. These include callout, arrow, line, and text annotations. See the Annotation Types sample to see an example of each annotation type.
An annotation can be anchored to either a data point or to a specified point within the chart picture (see the figure below).
The anchor point can be inside or outside of the annotation.
If you explicitly set an annotation's (X,Y) coordinates, the annotation will no longer be glued to its anchor point, such as a data point in the plot area.
You can apply smart labels to annotations to make them smart annotations. Smart annotations automatically reposition themselves to prevent collision with other labels and annotations. This improves the readability of a chart. In the figure below, the chart uses smart annotations.The red rectangular boxes indicate the position of a typical annotation and label (smart label not enabled). Note that the bigger box covers a data point in the plot area. The green rectangular boxes indicate the position of smart annotation and label.
AAn annotation group is similar to other annotations in that it has appearance properties, a bounding rectangle, position and size properties, and so on. The major difference is that an annotation group has an Annotations collection property, used to store its child annotation objects.
The purpose of annotation groups is two-fold:
- Grouped annotations can be moved as a single entity.
- Common appearance properties can be applied to all grouped annotations.
The appearance properties of an annotation group are not applied to the group's bounding rectangle, but to its child annotations. However, appearance properties of child annotations do have precedence over the appearance properties of the annotation group.
Annotations offer a high degree of optional interactivity, including the following:
Movement of the annotation's anchor point by clicking on the anchor and dragging the mouse. Movement of the entire annotation. Path editing (polygon annotations only). Resizing. Text editing.