ComponentOne FlexChart for WPF
Text Annotation
FlexChart > Working with FlexChart > FlexChart Elements > Annotations > Types of Annotations > Text Annotation

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.

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