FlexChart > Working with FlexChart > FlexChart Elements > Annotations > Adding Annotations |
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 add it to the Layers collection of FlexChart. To add an annotation into the annotation layer, create an instance of the 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.