This is a migrated thread and some comments may be shown as answers.

Automatic Rotation of X-Axis Labels

1 Answer 147 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
safeer
Top achievements
Rank 1
safeer asked on 21 Jun 2013, 03:39 PM
Hi,
I'm trying to achieve what's already provided in Microsoft Charting control, if the label text is large then it will automatically rotate it. How can I achieve it in Telerik?

I know we can set Rotation Angle of labels but chart shows different labels based on user selection, I don't want to always rotate them. As I don't know which user selection will cause large labels so I can't manually set the rotation angles.

Please see attached images ...if I browse chart on weeks, the labels are automatically rotated 

Thanks,
Safeer

1 Answer, 1 is accepted

Sort by
0
Rosko
Telerik team
answered on 26 Jun 2013, 11:17 AM
Hi Safeer,

RadChart does not support such feature. Sorry for the caused inconvenience.

Nevertheless, I can offer you the following options as a workaround to improve the situation.

The first one is to set the LabelStep property. This way you will have less labels on the axis and they will not overlap.
radChart.PlotArea.XAxis.LabelStep = 2;

The other one is to have the label on more than one line. This is achieved by setting the CustomFormat property.
radChart.PlotArea.XAxis.Appearance.CustomFormat = "HH:mm:ss\ndd-MMM\nyyyy";


Regards,
Rosko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Chart (Obsolete)
Asked by
safeer
Top achievements
Rank 1
Answers by
Rosko
Telerik team
Share this question
or