Articles in this section
Category / Section

how to apply label rotation for Axis Labels?

2 mins read

Description:

Axis labels can be rotated by giving rotation angle for the label. This article describes how to apply label rotation for axis labels.

Solution:

Rotation of the axis labels are done by assigning the required value (degree) to the LabelRotationAngle property of the axis.

SfChart supports rotation in both clockwise and anti-clockwise direction. That is, both positive and negative values as follows.

C:\Users\giftline.jebamani\Desktop\img.jpg Note: Here, the rotation is done with the axis label center as orgin.

The following code example assigns positive rotation angle to the axis labels.

XAML

<syncfusion:SfChart.PrimaryAxis >
            <syncfusion:CategoryAxis Header="Product" LabelRotationAngle="45"/>
</syncfusion:SfChart.PrimaryAxis>

 

Output for Positive Degree:

The following screenshot describes the output for the axis labels rotated at an angle of 45o.

F:\Issue Files Chart\Issue File -10 Knowledge Base\WP_ScreenShot\New Second TIme\wp_ss_20150210_0030.png

Figure 1: Chart with axis labels rotated with an angle of 45o.

The following code assigns negative rotation angle for the axis.

C#

this.axisChart.PrimaryAxis.LabelRotationAngle = -270;

 

Output for Negative Degree:

The following screenshot describes the output for the axis labels rotated at an angle of -270o.

F:\Issue Files Chart\Issue File -10 Knowledge Base\WP_ScreenShot\New Second TIme\wp_ss_20150210_0031.png

Figure 2: Chart with axis labels rotated with an angle of -270o.

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied