timdream / wordcloud2.js

Tag cloud/Wordle presentation on 2D canvas or HTML

Home Page:https://wordcloud2-js.timdream.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Top word is missed off cloud if changing dimension

TheFrogDaddy opened this issue · 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?

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.

commented

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.