jasondavies / d3-cloud

Create word clouds in JavaScript.
https://www.jasondavies.com/wordcloud/
Other
3.82k stars 1.07k forks source link

Can we make this svg cloud responsive #122

Closed jithinsayone closed 6 years ago

plonknimbuzz commented 7 years ago

just change your old width/height with your new width/heigth container when window event resize trigerred.
and also you need to re scale your svg. if not your svg will display behalf (some word missing)

or you can try this : https://julienrenaux.fr/2014/09/23/d3-js-responsive-word-cloud/

daverted commented 7 years ago

The SVG can be made responsive by defining the viewBox attribute and styling width and height. See PR #128 for an example.