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

Center-align wrapped chart labels

2 Answers 220 Views
Drawing API
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
Stefan asked on 13 Oct 2020, 02:10 PM

Hello,

the following example renders a wrapped chart label using the drawing API:

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/categoryaxis.labels#categoryaxislabelsvisual

 

Now, if you take this example (https://dojo.telerik.com/ERuyOquh),you can see that the texts are right-aligned. Is it possible to align these centered?

 

Kind regards.

2 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetomir
Telerik team
answered on 15 Oct 2020, 08:08 AM

Hi Stefan,

The default alignment of items within a Drawing Layout element is left. In order to align the inner items to the center, set the following option:

alignItems:"center"

Check out the modified Dojo sample here:

https://dojo.telerik.com/UPAmIroS

Let me know if this is not the outcome you are willing to achieve.

 

Kind regards,
Tsvetomir
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
answered on 16 Oct 2020, 07:23 AM

Hello Tsvetomir,

thank you very much, that works perfectly. :)

Kind regards.

Tags
Drawing API
Asked by
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Tsvetomir
Telerik team
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or