You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I am trying to attach d3 word cloud in my android app.
To support many kinds of android devices, I wanna optimize the word cloud's size programmatically.
Also, fontSize and color of each words.
Can you give me any hints? I am not really familiar with js so it is very difficult for me.
Thank you.
The text was updated successfully, but these errors were encountered:
All the logic in done in d3.js (https://d3js.org/). There really is no way around it. You can compute some of the values (like the size) in java/android and pass them as parameters, just like you pass the "wordCloud" in MainActivity.
For example, replace change the StringBuilder to include other params, like: sb.append("], 300)");
and in javascript, replace the hardcoded values with variables:
function wordCloud(data, cloudSize) {
var fill = d3.scale.category20();
var layout = d3.layout.cloud().size([cloudSize, cloudSize ])
...
Hi
I am trying to attach d3 word cloud in my android app.
To support many kinds of android devices, I wanna optimize the word cloud's size programmatically.
Also, fontSize and color of each words.
Can you give me any hints? I am not really familiar with js so it is very difficult for me.
Thank you.
The text was updated successfully, but these errors were encountered: