ComponentOne FlexChart for UWP
FlexChart / Working with FlexChart / FlexChart Elements / Annotations / Types of Annotations / Text Annotation
In This Topic
    Text Annotation
    In This Topic

    Text annotations let you add additional information at specific data points to make the data informative. FlexChart lets you add single line as well as multiline text in text annotations.

    The following image shows the Text annotation displaying the maximum population growth rate between 1961 and 2011.

    To work with text annotation in FlexChart, create an instance of the Text class and set the Content property for the instance.

    The following code compares population growth rates at specific years in five consecutive decades. The code shows how to add, position, and customize the Text annotation in FlexChart.

    <Chart:C1FlexChart.Layers>
        <Annotation:AnnotationLayer>
                <Annotation:AnnotationLayer.Annotations>
                <Annotation:Text Content="Maximum Population Growth Over Preceding Year&#x0a;(24.7 From 21.6)" 
                              Attachment="DataCoordinate"
                              Location="1961,25.15"
                              Position="Top">
                    <Annotation:Text.Style>
                        <Chart:ChartStyle Stroke="Green"
                                       FontFamily="GenericSansSerif" 
                                       FontSize="8"
                                       FontWeight="Bold" />
                    </Annotation:Text.Style>
                </Annotation:Text>
            </Annotation:AnnotationLayer.Annotations>
            </Annotation:AnnotationLayer>
    </Chart:C1FlexChart.Layers>