Join GitHub today
WordCloud Not displaying all the words and lot of space left unused. #7241
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
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.
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
It is not published. Planning on including it in our next maintenance release v6.0.2.