I need consistent and arbitrary placement of words. d3cloud.random determines placement, and returning a fixed number creates visual patterns. While returning a random number creates inconsistent word cloud generation.
What
Pass the word to d3cloud.random so the word can be hashed to determine placement
Math.random is used when d3cloud.random is not specified. In this PR it is receiving d.text as an argument, but it it doesn't accept arguments, so it's benign. If anyone wants to argue this is bad I could maybe fix it.
Why
I need consistent and arbitrary placement of words.
d3cloud.random
determines placement, and returning a fixed number creates visual patterns. While returning a random number creates inconsistent word cloud generation.What
Pass the word to
d3cloud.random
so the word can be hashed to determine placementUse it somehow similar to this
Notes
Math.random
is used whend3cloud.random
is not specified. In this PR it is receivingd.text
as an argument, but it it doesn't accept arguments, so it's benign. If anyone wants to argue this is bad I could maybe fix it.