markoliinyk
Posts: 6
Joined: Tue Feb 22, 2022 12:17 pm

WordCloud: background color for words

Hey!

Is there a way to make wordcloud more like a tagcloud?

I want words to look like blocks with rounded corners and background color.

I suppose it's not possible out of the box due to usage of svg <text> for each word but maybe there is a hidden solution or alternative rendering mode that will allow such styling.

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

Re: WordCloud: background color for words

Hi markoliinyk,

Thanks for contacting us with your question.

Could you provide me with an example how the final effect should look like? If you have any illustrations it would be helpful.

Regards!
Mateusz Bernacik
Highcharts Developer
markoliinyk
Posts: 6
Joined: Tue Feb 22, 2022 12:17 pm

Re: WordCloud: background color for words

Hey!

Thanks for your answer.

Sure, example attached
Attachments
index.png
index.png (218.57 KiB) Viewed 352 times
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: WordCloud: background color for words

Hi markoliinyk,

Something like that is not implemented, but you could use SVGRenderer tool to render background like that for each word.
Demo:https://jsfiddle.net/BlackLabel/t7xnjbf9/
API reference:https://api.highcharts.com/class-refere ... derer#rect

Let me know if you have any further questions.
Regards!
Mateusz Bernacik
Highcharts Developer
markoliinyk
Posts: 6
Joined: Tue Feb 22, 2022 12:17 pm

Re: WordCloud: background color for words

That's exactly what I was looking for :)

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

Re: WordCloud: background color for words

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

Return to “Highcharts Usage”