Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Word Cloud getting blurry

I'm trying to draw the word cloud using wordcloud2.js:

var options = 
        {
         list : wordsSizeList,
         fontFamily: 'Finger Paint, cursive, sans-serif'
        }
WordCloud(target, options);

But my words are getting blurred (which might be because of low resolution image).

enter image description here

Wordcloud2.js uses canvas for drawing these words. So there should be some way to increase the pixel density of this canvas ?

like image 207
Saurabh Verma Avatar asked Feb 20 '26 02:02

Saurabh Verma


1 Answers

Set the size of the canvas like:

<canvas height="400" width="400" />

That should provide you a properly sized canvas (with higher resolution)

like image 67
Matyas Avatar answered Feb 21 '26 15:02

Matyas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!