javascript - Overlap of Elements in d3.js Word cloud -


i trying create word cloud in d3. have following code

http://jsbin.com/vefifukeno/edit?html,js,output

how can overcome overlap of words. unable understand why words go out of margin have given math.random() should between 0 , 1.

please note in jason davies himself wrote : "note layout algorithm , code converting text words , rendering final output requires additional development." https://www.jasondavies.com/wordcloud/about/

so must implement self..


Comments