WordCloud Not displaying all the words and lot of space left unused. #7241
Comments
Hi @Abhijith-Nagaraja |
@jon-a-nygaard : Thanks for considering this. We shifted from D3 word cloud to Highcharts as we had licence... and this is a major issue for us. If you can suggest any workaround for now, this would be helpful |
Hi @Abhijith-Nagaraja |
Here's an example which makes better use of available space. It places all the words in the center, and then moves a word in a rectangular spiral when doing collision testing. The spiral takes aspect ratio into account. As you see from the demo, it is a bit slow, which is something I want to improve. Sometimes there can be an unnecessary amount of white space on one of the sides. This is due to the scaling is not a 100% optimal, which is something I want to work on soon as well. Luckily in cases as yours, where there is a lot of data, then it is hardly recognisable. Hope it helps. EDIT: should you want to try optimizing the demo yourself, then the |
@jon-a-nygaard : Looks good. Is this been published? I use npm and I don't see an update there... Or should I use it a custom plugin? |
It is not published. Planning on including it in our next maintenance release v6.0.2. |
@jon-a-nygaard : Thanks for the confirmation. I will wait for the release. |
Hey Guys, I'm also facing a similar issue There's at least two words that doesn't display (China and India) they are the biggesst weight in my entire series don't know if this is related. |
@jon-a-nygaard any comments? |
I also encountered the same problem. Looks like in @Dams591 code, the missing words failed the following test condition: highcharts/js/modules/wordcloud.src.js Line 333 in 88e8c48 If I change the playing field into something big like replacing highcharts/js/modules/wordcloud.src.js Line 234 in 88e8c48 the missing words will appear as in https://jsfiddle.net/t253fxw3/1/. |
@JockiHendry nice find !!! |
Related to #7491 |
@KacperMadej trying the github build (https://github.highcharts.com/modules/wordcloud.js) doesn't solve the issue so not sure it is related (maybe close enough though) |
So @Dams591 what does the find @JockiHendry made control? I've increased the multiplier to 10.1 and don't see any visible changes other than all words are shown. |
Hi @timlaughlin |
Expected behaviour
Actual behaviour
I tried to plot exactly 500 words. But all the words did not come up. And also when chart area is increased, the words were center aligned (which is good) but a lot of space on either side (left and right) were unused and were empty. I tried setting marginRight and marginLeft to zero. But it did not help
Live demo with steps to reproduce
Stackoverflow link: https://stackoverflow.com/questions/46612634/disable-spiral-in-word-cloud-and-display-all-the-words-in-highcharts/
JS fiddle link: http://jsfiddle.net/ynr4oszw/3/
Try resizing the pane of the chart to increase the chart area and one can see the behaviour I am talking about.
Affected browser(s)
All
The text was updated successfully, but these errors were encountered: