jasondavies / d3-cloud

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

Complete example #78

Closed redskate closed 8 years ago

redskate commented 8 years ago

Hi, very nice cloud!

I am not really a javascript expert and I would like to integrate your nice tag cloud as javascript program in my tomcat web application. It has to run inside a browser on some browser client calling the web app from the web "outside". Unfortunately there are some things which are probably assumed but not explicitely written. Since you appear to make use in the code of "require()", I assume you assume that one has node.js installed. This is not an issue, but it is not self understanding ... Do one have to have node.js installed? node.js is a server component, I need a client js tag cloud builder.

I further suppose that the "code" to build the tag cloud to be loaded inside the html page of the (my) web app be inside the build folder and be "d3.layout.cloud.js". I just load this file as script into the web page.

Do you have some complete neat running example of a web page using d3-cloud to be used with word-number pairs for me please? The demo is not really practicable since it loads two files (d3.min.js and cloud.min.js which are _not_ in the package) - instead of this build file.

Sorry for this stupid request, but it would help me and others a lot!

Regards

lgalarra commented 8 years ago

Hi, I would be also interested in a full working example. I have not managed to generate a cloud on my own with the given files.

mrajcok commented 8 years ago

This fiddle might help you (it helped me): http://jsfiddle.net/adiioo7/rutpj/light/ Note that it is picking up the d3-cloud library from https://jardindesconnaissance.googlecode.com/svn-history/r82/trunk/public/js/d3.layout.cloud.js, so I suggest you download it, then add a <script> tag to your HTML to load it locally.