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

Rotated Label Alignment

1 Answer 56 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Liz
Top achievements
Rank 1
Liz asked on 03 Jul 2012, 10:38 AM
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

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 05 Jul 2012, 07:45 AM
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.
Tags
Chart (Obsolete)
Asked by
Liz
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or