Rotated Label Alignment

Thread is closed for posting
2 posts, 0 answers
  1. Liz
    Liz  avatar
    1 posts
    Member since:
    Feb 2012

    Posted 03 Jul 2012 Link to this post


    I have a Chart set up to use rotated labels on the X axis:

          chartAxis.Appearance.LabelAppearance.RotationAngle = 45;
          chartAxis.Appearance.LabelAppearance.Position.Auto = false;
          chartAxis.Appearance.LabelAppearance.Position.AlignedPosition = AlignedPositions.Top;
          chartAxis.AutoScale = false;

    The result is very much like the demo that can be seen here:

    The actual x-axis labels don't line up with their corresponding points. Is there a way to shift or align the labels so the top of the text is level with the point marker for the correct point.

  2. Evgenia
    Evgenia avatar
    1396 posts

    Posted 05 Jul 2012 Link to this post

    Hi Liz,

     Unfortunately, the rotation axis cannot be controlled - the origin of the rotation is the label center. You can use the labels position to achieve similar results.

    <LabelAppearance RotationAngle="-45" Position-AlignedPosition="TopLeft"

    The results however will vary according to the label text length - the longer the text, the outer the right end will go.

    the Telerik team

    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 their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top