FlexChart enables you to add annotations in an annotation layer, which contains the collection of all annotations in the chart.
To add annotations in FlexChart, follow these steps:
To create an annotation layer in FlexChart, create an instance of the AnnotationLayer class and pass FlexChart as the parameter into it. To add an annotation into the annotation layer, create an instance of the respective annotation class based on its type. Add the annotation instance to the Annotations collection of the annotation layer.
The following code snippet illustrates how to create and add the Rectangle annotation to Annotation Layer in FlexChart.