analyticalpicasso
analyticalpicasso

Reputation: 1993

creating word cloud with d3.js

I am trying to create word cloud using d3.js and d3.layout.cloud.js.

For this I am using .csv file which contains rows word,size. But unable to create the file. Unable to understand that where I'am going wrong with this.

Following is my code:

Word Cloud creation using d3.js in .csv

Upvotes: 1

Views: 4754

Answers (1)

Lars Kotthoff
Lars Kotthoff

Reputation: 109242

d3.csv is an asynchronous call. That means that it doesn't return anything, you have to process the data in the callback. I've done that (and fixed a few other things) here. I've also limited the font sizes to be between 8 and 24 as the values in your data are rather large.

Upvotes: 4

Related Questions