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

Change Y axis label Text Alignment to Right

1 Answer 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dinakaran
Top achievements
Rank 1
Dinakaran asked on 28 Dec 2016, 08:10 AM

Hello,

         I am using secondary Y axis which is placed AtMaximum and i am displaying labels from 0 to 100 with 10 major steps. I need to right align these numbers. For example,

           100     -    100

           90       -      90

           80       -      80

           0         -        0

but it is not working with the style. i tried to assign LabelFormat to '{0,5:N0}'. but it is also not worked. Is any other way to achieve this?

 

1 Answer, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 28 Dec 2016, 09:43 AM
Hi Dinakaran,

The size of the axis labels' bounding boxes are calculated separately for every label and they are not related to each other so they can be aligned only based on their position in relation to the axis. Therefore, for Y axis, placed on the left side of the X axis, the labels are right-aligned and vice versa, the Y axis that is placed on the right side of the X axis, the labels are left aligned.

However, you can use the LabelFormat property to pad the label's value with the required number of characters, but it would work right only when using a monospaced font like Courier or Consolas.

Hope it helps.

Regards,
Ivan Hristov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Dinakaran
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Share this question
or