Automatic Rotation of X-Axis Labels

Thread is closed for posting
2 posts, 0 answers
  1. safeer
    safeer avatar
    14 posts
    Member since:
    Nov 2006

    Posted 21 Jun 2013 Link to this post

    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 

  2. Rosko
    Rosko avatar
    137 posts

    Posted 26 Jun 2013 Link to this post

    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";

    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.
Back to Top