pack()

pack(root)

Lays out the specified root hierarchy, assigning the following properties on root and its descendants:

  • node.x - the x-coordinate of the circle’s center
  • node.y - the y-coordinate of the circle’s center
  • node.r - the radius of the circle

You must call root.sum before passing the hierarchy to the pack layout. You probably also want to call root.sort to order the hierarchy before computing the layout.

doc_D3_Js
2016-11-24 10:28:13
Comments
Leave a Comment

Please login to continue.