D3.js packed circle layout - how to adjust child radius

前端 未结 2 1429
梦谈多话
梦谈多话 2021-01-15 15:32

I am currently useing d3\'s packed cicle layout(this) and have noticed that when a parent only has one child, the radius of the child is the same as the parents.

Is

2条回答
  •  半阙折子戏
    2021-01-15 15:37

    I haven't looked at v3 of D3, but v4 has pack.padding() method that you can specify the amount of padding to include.

    See the example image, the circle on the right is a solo child.

提交回复
热议问题