SeregPie / VueWordCloud

Generates a cloud out of the words.
https://seregpie.github.io/VueWordCloud/
MIT License
386 stars 60 forks source link

word cloud did not show #28

Closed lchhieu closed 6 years ago

lchhieu commented 6 years ago

I am trying use code demo but words don't seem is show

<vue-word-cloud
                            :words="[['romance', 19], ['horror', 3], ['fantasy', 7], ['adventure', 3]]"
                            :color="([, weight]) => weight > 10 ? 'DeepPink' : weight > 5 ? 'RoyalBlue' : 'Indigo'"
                            font-family="Roboto"
                    ></vue-word-cloud>

result <div style="position: relative; width: 100%; height: 100%; overflow: hidden;"><div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"></div></div>

SeregPie commented 6 years ago

Without your code I cannot help you much.

Try to set width and height of the word cloud.

style="width: 400px; height: 400px;"
lchhieu commented 6 years ago

I just update. Can you help me

SeregPie commented 6 years ago

Try to set width and height of the word cloud.

style="width: 400px; height: 400px;"
lchhieu commented 6 years ago

It worked well. thanks