[]
        
(Showing Draft Content)

Rotate Annotations

In FlexChart for WinForms, use the Angle property of the Text class (C1.Win.Chart.Annotation) to rotate text annotations. By default, text annotations render horizontally without rotation.

The Angle property sets the rotation angle, in degrees, for a text annotation.

Property

Type

Default

Description

Angle

double

0

Gets or sets the rotation angle in degrees for the annotation text.

The following example shows a text annotation before and after rotation. When no angle is specified, the text renders horizontally without rotation:

//Annoted text before rotation
var  = new C1.Win.Chart.Annotation.Text("Facebook inc to acquire LifeRail.")
{
    SeriesIndex = 0,
    PointIndex = 20,
    Attachment = AnnotationAttachment.DataIndex,
    Position = AnnotationPosition.Left,
       
}; 

A FlexChart showing the text annotation "Facebook inc to acquire LifeRail." rendered horizontally without rotation.

Setting the Angle property to 45 rotates the annotation text:

//Annotated text after rotation is applied.
var txtFB = new C1.Win.Chart.Annotation.Text("Facebook inc to acquire LifeRail.")
{
    SeriesIndex = 0,
    PointIndex = 20,
    Attachment = AnnotationAttachment.DataIndex,
    Position = AnnotationPosition.Left,
    Angle = 45
       
};

The same FlexChart with the text annotation rotated 45 degrees using the Angle property.