chartographer
Posts: 2
Joined: Fri Mar 17, 2023 8:04 am

Polar chart xAxis label groups and positioning

1. Is it possible to natively create groups of categories on xAxis of polar chart? Group labels text should follow the outer circumference of chart.

I did manage to create a solution with plot bands, and by manipulating DOM elements by wrapping label content with <textPath> so text shape follows circumference, but it just looks like a lot of code. I also need to trigger that code on render and redraw events

2. Is it possible to natively position xAxis category labels centered to column value?

Attached example.
polar.jpg
polar.jpg (57.37 KiB) Viewed 171 times
User avatar
dawid.d
Posts: 837
Joined: Thu Oct 06, 2022 11:31 am

Re: Polar chart xAxis label groups and positioning

Hi,

Welcome to our forum and thanks for contacting us with your question!

1. I think your idea of using plot bands might be the best and simplest to draw such categories. We have an external module that allows you to add grouped categories, but it does not fully support polar charts at the moment.
See: https://blacklabel.github.io/grouped_categories/

2. Also, the API does not provide such an option directly. This can be done by editing the rotation of the x-axis labels in the render callback, as in the demo below.

Demo: https://jsfiddle.net/BlackLabel/kaqsf7o9/

​If you have further inquiries, you may reach out to me at any time.
Best regards!
Dawid Draguła
Highcharts Developer
chartographer
Posts: 2
Joined: Fri Mar 17, 2023 8:04 am

Re: Polar chart xAxis label groups and positioning

Thank you for support, this has been most helpful
User avatar
dawid.d
Posts: 837
Joined: Thu Oct 06, 2022 11:31 am

Re: Polar chart xAxis label groups and positioning

You're welcome, I'm glad it was helpful!

In case of any further questions, feel free to contact us again.
Regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Usage”