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

    Hi,

    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:
    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/chartandtooltip/defaultcs.aspx?product=chart

    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.

    Regards
    Liz
  2. Evgenia
    Admin
    Evgenia avatar
    1406 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"
    </LabelAppearance>

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

    Regards,
    Evgenia
    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. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top