alexaugusto1
Posts: 15
Joined: Thu Mar 11, 2021 4:29 pm

PackedBubble not displaying text in some circles

Hi guys,

I'm having an issue with the PackedBubble.

Some of the circles are not displaying the text, even though the text exists in the JSON.

You can see an example in the following link, where there are two blue circles with no texts:

https://jsfiddle.net/alexaugusto/L9on6ham/51/

One other thing, there is some way to force the text to be in the middle of the circle?
Some of them are, but others aren't.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: PackedBubble not displaying text in some circles

Hi alexaugusto1,

Thanks for contacting us with your question.

Your points are really tightly packed and there is simply too little space to show all data labels. To force them to show you can set dataLabels.allowOverlap option value to true. When it comes to center placement, I think that simple textAlign property should do the trick.
Demo: https://jsfiddle.net/BlackLabel/th1kr2qn/
API reference: https://api.highcharts.com/highcharts/s ... lowOverlap

Let me know if that was what you were looking for!
Regards!
Mateusz Bernacik
Highcharts Developer
alexaugusto1
Posts: 15
Joined: Thu Mar 11, 2021 4:29 pm

Re: PackedBubble not displaying text in some circles

Thank you mateusz.b,

That is exactly what I need.

One last thing, sometimes the circles are being cut, as you can see in this example:

https://jsfiddle.net/alexaugusto/L9on6ham/56/

I've changed the maxSize and margin a couple of times, and it works in some scenarios, but depending on the chart series that we have, it may cut.
Is there any way that we can avoid the circles being cut, regardless the series data we have?

Thanks.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: PackedBubble not displaying text in some circles

Hi alexaugusto1,

Please try to set clip: false property for series and let me know if it helps.
Demo: https://jsfiddle.net/BlackLabel/w79ztaqf/
API reference: https://api.highcharts.com/highcharts/s ... ubble.clip

Regards!
Mateusz Bernacik
Highcharts Developer
alexaugusto1
Posts: 15
Joined: Thu Mar 11, 2021 4:29 pm

Re: PackedBubble not displaying text in some circles

Thank you mateusz.b,

All good now! :)
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: PackedBubble not displaying text in some circles

You're welcome! In case of any further questions, feel free to contact us again.
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”