We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to rotate and position labels efficiently in Chart without overlapping?

Platform: ASP.NET Web Forms (Classic) |
Control: Chart |
Published Date: July 18, 2014 |
Last Revised Date: October 29, 2014 |
.NET Framework: 4.5 |
Product Version: 11.4.0.26

 

Label Rotation:

               

Axis labels can be rotated by enabling LabelRotate property of chart axis and assigning an angle to LabelRotateAngle property of chart axis.

 

C#

 

Label Alignment:

 

Alignment of axis labels can be customized using LabelAlignment property of chart axis. The default value of this property is Center. You can also set Near and Far as values for this property.

C#

 

Rotation and Center Alignment:

Applying center alignment to axis labels will place them center to axis ticks. For example, if axis labels are rotated to 90 degrees with center alignment it appears similar to the below screenshot of labels aligned at “Center”. Appearance of labels will be good with center alignment if they are rotated to 90, 180 and 270 degrees.

C#

The following is a screenshot of a Chart with the labels in Center alignment.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Rotation and Far Alignment:

Applying Far alignment to axis labels will place them after axis ticks. For example, if axis labels are rotated to 45 degrees with Far alignment it appears similar to the following screenshot of labels aligned at Far. Appearance of labels will be good with Far alignment if they are rotated between 0 to 90 degrees and 180 to 270 degrees.

C#

 

The following is a screenshot of a Chart with the labels in Far alignment .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Rotation and Near Alignment:

Applying Near alignment to axis labels will place them before axis ticks. For example, if axis labels are rotated to 135 degrees with Near alignment it appears similar to the below screenshot of labels aligned at Near. Appearance of labels will be good with near alignment if they are rotated between 90 to 180 degrees and 270 to 360 degrees.

 

 

 

The following is a screenshot of a Chart with the labels in Near alignment.

 

 

 

 

 

 

 

 

 

 

 

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon