wordcloud2.js icon indicating copy to clipboard operation
wordcloud2.js copied to clipboard

Top word is missed off cloud if changing dimension

Open TheFrogDaddy opened this issue 5 years ago • 2 comments

If you perform the following steps.

  1. Go to demo page
  2. Select example "Web Technologies"
  3. Change dimensions to "520 x 270"

Then: The very first item on the list "Web Technologies" isn't shown.

This makes this cloud completely useless imo as I can present this knowing the most popular isn't even shown. I don't see a workaround for this from the API docs?

Help! Is this a bug or a config issue?

TheFrogDaddy avatar Oct 28 '18 15:10 TheFrogDaddy

I think this occurs when the first word is sort of long and it tries to draw it rotated vertically.

try setting drawOutOfBound: true in the options and see if that helps. It seemed to help for me.

It would be nice to tell it not to rotate the top word, as I think it looks best when the first word is normal and all the other words around it are rotated or not randomly.

brianpursley avatar May 06 '19 02:05 brianpursley

If you perform the following steps.

1. Go to demo page

2. Select example "Web Technologies"

3. Change dimensions to "520 x 270"

Then: The very first item on the list "Web Technologies" isn't shown.

This makes this cloud completely useless imo as I can present this knowing the most popular isn't even shown. I don't see a workaround for this from the API docs?

Help! Is this a bug or a config issue?

Set drawOutOfBound: true -> you see the word, which is infact to big to fit into the canvas. Or decrease weightFactor, to decrease Font Size.

nickyreinert avatar May 13 '20 10:05 nickyreinert