D3 word cloud layout circle and rectangular
问题 I'm a D3 newbie and trying to build word cloud page using JasonDavies d3-cloud. But sometimes all words are showing in circle layout, but sometimes in rectangular. How can I make them always locate in circle layout? 回答1: d3-cloud 's layout algorithm places words within an ellipse starting from the center of the rectangle you've provided ( d3.layout.cloud().size([width, height]) ). If you have a container ( size([width, height]) ) big enough compared to your number of words and the size you've