enwayshih
Posts: 7
Joined: Tue Jun 29, 2021 8:24 pm

How to Rotate xAxis Labels (grouped category)

Hi Team,

is it possible to rotate the 3rd level labels (apple, banana, orange....etc) to vertical , but keep 1st and 2nd labels in horizontal?
you can refer this demo: https://jsfiddle.net/onk9xz20/

another question, if I set all lebels in horizontal, is it possible to extend the box of 3rd level ? as you can see they display with dots like: app..., ban...., oran....

Thanks for the help
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: How to Rotate xAxis Labels (grouped category)

Hello,

Thanks for contacting us with your question!

This is not possible via API, you would have to modify the plugin you are using.

Regarding the second question. How would you like to extend them?

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
enwayshih
Posts: 7
Joined: Tue Jun 29, 2021 8:24 pm

Re: How to Rotate xAxis Labels (grouped category)

Hi michal.f,

thanks for reply,
for second question, if it can show the entire name of all labels will be nice (no appl..., oran.... anymore), maybe add a scroll bar below?
and is it possible to change all labels from bottom to top?

thank you so much for your help :)
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: How to Rotate xAxis Labels (grouped category)

Hi,
enwayshih wrote: Tue Jan 25, 2022 12:31 am and is it possible to change all labels from bottom to top?
Yes, you can set xAxis.labels.rotation on -90 to achieve this.

Demo: https://jsfiddle.net/BlackLabel/cqhdnpx8/
API: https://api.highcharts.com/highcharts/x ... s.rotation

enwayshih wrote: Tue Jan 25, 2022 12:31 am if it can show the entire name of all labels will be nice (no appl..., oran.... anymore), maybe add a scroll bar below?
To add a scrollbar you can use chart.scrollablePlotArea property.

Demo:
https://jsfiddle.net/BlackLabel/vgzqe93d/
API: https://api.highcharts.com/highcharts/c ... a.minWidth

Feel free to ask any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Usage”