FlexChart | ComponentOne
WPF FlexChart / Working with FlexChart / FlexChart Elements / Annotations / Adding 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:

    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.

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