ComponentOne FlexChart for UWP
FlexChart / Working with FlexChart / FlexChart Elements / Annotations / Adding Annotations
In This Topic
    Adding Annotations
    In This Topic

    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:

    1. Create an annotation layer in FlexChart.
    2. Add the annotation instance in the annotation layer.

    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.

    <Chart:C1FlexChart.Layers>
        <Annotation:AnnotationLayer>
            <Annotation:AnnotationLayer.Annotations>
                <Annotation:Rectangle Content="Maximum Tax Revenue&#13;2013&#13;45000">
                </Annotation:Rectangle>
            </Annotation:AnnotationLayer.Annotations>
        </Annotation:AnnotationLayer>
    </Chart:C1FlexChart.Layers>