treemap.paddingTop()

treemap.paddingTop([padding]) If padding is specified, sets the top padding to the specified number or function and returns this treemap layout. If padding is not specified, returns the current top padding function, which defaults to the constant zero. If padding is a function, it is invoked for each node with children, being passed the current node. The top padding is used to separate the top edge of a node from its children.

treemap.paddingOuter()

treemap.paddingOuter([padding]) If padding is specified, sets the top, right, bottom and left padding to the specified number or function and returns this treemap layout. If padding is not specified, returns the current top padding function.

treemap.round()

treemap.round([round]) If round is specified, enables or disables rounding according to the given boolean and returns this treemap layout. If round is not specified, returns the current rounding state, which defaults to false.

treemap.paddingBottom()

treemap.paddingBottom([padding]) If padding is specified, sets the bottom padding to the specified number or function and returns this treemap layout. If padding is not specified, returns the current bottom padding function, which defaults to the constant zero. If padding is a function, it is invoked for each node with children, being passed the current node. The bottom padding is used to separate the bottom edge of a node from its children.

treemap.padding()

treemap.padding([padding]) If padding is specified, sets the inner and outer padding to the specified number or function and returns this treemap layout. If padding is not specified, returns the current inner padding function.

treemap()

treemap(root) Lays out the specified root hierarchy, assigning the following properties on root and its descendants: node.x0 - the left edge of the rectangle node.y0 - the top edge of the rectangle node.x1 - the right edge of the rectangle node.y1 - the bottom edge of the rectangle You must call root.sum before passing the hierarchy to the treemap layout. You probably also want to call root.sort to order the hierarchy before computing the layout.

treemap.paddingInner()

treemap.paddingInner([padding]) If padding is specified, sets the inner padding to the specified number or function and returns this treemap layout. If padding is not specified, returns the current inner padding function, which defaults to the constant zero. If padding is a function, it is invoked for each node with children, being passed the current node. The inner padding is used to separate a node’s adjacent children.

tree.separation()

tree.separation([separation]) If separation is specified, sets the separation accessor to the specified function and returns this tree layout. If separation is not specified, returns the current separation accessor, which defaults to: function separation(a, b) { return a.parent == b.parent ? 1 : 2; } A variation that is more appropriate for radial layouts reduces the separation gap proportionally to the radius: function separation(a, b) { return (a.parent == b.parent ? 1 : 2) / a.depth;

tree()

tree(root) Lays out the specified root hierarchy, assigning the following properties on root and its descendants: node.x - the x-coordinate of the node node.y - the y-coordinate of the node The coordinates x and y represent an arbitrary coordinate system; for example, you can treat x as an angle and y as a radius to produce a radial layout. You may want to call root.sort before passing the hierarchy to the tree layout.

tree.nodeSize()

tree.nodeSize([size]) If size is specified, sets this tree layout’s node size to the specified two-element array of numbers [width, height] and returns this tree layout. If size is not specified, returns the current node size, which defaults to null. A node size of null indicates that a layout size will be used instead. When a node size is specified, the root node is always positioned at ⟨0, 0⟩.