noamros
Posts: 5
Joined: Wed Apr 28, 2021 5:33 am

Wrapping text in packed bubble chart

Hey,
I've been using the packed bubble chart on a single series (splitSeries=false).
I was wondering if there was a way to avoid the data labels 'going out' of the bubble, either by wrapping the text or truncating it.
Example: https://jsfiddle.net/exu5n9m6/17/

Alternatively
Is there is a way for the data labels to appear above the bubble like when defining parentNodeFormat, but on each value of a single series?

Thanks!
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: Wrapping text in packed bubble chart

Hello, welcome to the official highcharts forum, and thanks for contacting us with your question!

You can make the text wrap over the path of the bubble, like this: https://jsfiddle.net/BlackLabel/L5tp1oak/

let me know if that works for you! Kind regards,
Paweł Lysy
Highcharts Developer
noamros
Posts: 5
Joined: Wed Apr 28, 2021 5:33 am

Re: Wrapping text in packed bubble chart

Works great, thanks!
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: Wrapping text in packed bubble chart

Great to hear! In case of any further questions feel free to contact us again! Kind regards
Paweł Lysy
Highcharts Developer
npcoder
Posts: 2
Joined: Sat Sep 25, 2021 9:12 am

Re: Wrapping text in packed bubble chart

Thank you @pawelys for the curve text label on the bubble.
Is there any option to display the long text to wrap inside a bubble?
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Wrapping text in packed bubble chart

Hello npcoder,

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

It is possible by setting useHTML on true and add styles where you must specify width.

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

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
npcoder
Posts: 2
Joined: Sat Sep 25, 2021 9:12 am

Re: Wrapping text in packed bubble chart

Thank you @michal.f for the link. It saved my day. Really appreciated!! :D
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Wrapping text in packed bubble chart

You're welcome!

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

Return to “Highcharts Usage”