Closed pgoswami3 closed 7 years ago
Hi Jason,
I know it's not a real issue but any help would be appreciated.
I'm trying to render my tweets into a word cloud but when I project my array of words, the array of quoted texts turns out to be unquoted one.
The only change on your part of code is to use my variable (textOnly)
d3.layout.cloud().size([600, 600]) .words(<%= textOnly %>.map(function(d) { return {text: d, size: 10 + Math.random() * 90}; }))
, instead of an array of predefined words ['I', 'am', 'Groot']
Snap 1: Console o/p with quoted/unique words
Snap 2: o/p in browser
Looks like you aren't encoding your variable correctly as a JavaScript array in your JSP template. (I assume that's JSP syntax.) Sorry, this isn't the place to ask for generic help: try StackOverflow.
Hi Jason,
I know it's not a real issue but any help would be appreciated.
I'm trying to render my tweets into a word cloud but when I project my array of words, the array of quoted texts turns out to be unquoted one.
The only change on your part of code is to use my variable (textOnly)
, instead of an array of predefined words ['I', 'am', 'Groot']
Snap 1: Console o/p with quoted/unique words
Snap 2: o/p in browser