Klortho / d3-flextree

Flexible tree layout algorithm that allows for variable node sizes
https://klortho.github.io/d3-flextree/
Do What The F*ck You Want To Public License
324 stars 46 forks source link

How to do Radial FlexTree #19

Open cvharris opened 3 years ago

cvharris commented 3 years ago

There are examples of radial d3 trees using the size property but I want to use flexTree to set the node size dynamically. Is there a way to create a radial tree layout with d3-flexTree?

sumitpal29 commented 3 years ago

since only the radius will vary for circles, you can consider as squares of different sizes. you can try calculating the center

cx = x + size /2, cy = y + size/2

where size [100, 100]