treemap.paddingRight()

treemap.paddingRight([padding]) If padding is specified, sets the right padding to the specified number or function and returns this treemap layout. If padding is not specified, returns the current right 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 right padding is used to separate the right 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.paddingLeft()

treemap.paddingLeft([padding]) If padding is specified, sets the left padding to the specified number or function and returns this treemap layout. If padding is not specified, returns the current left 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 left padding is used to separate the left edge of a node from its children.

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.

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.

tree.size()

tree.size([size]) If size is specified, sets this tree layout’s size to the specified two-element array of numbers [width, height] and returns this tree layout. If size is not specified, returns the current layout size, which defaults to [1, 1]. A layout size of null indicates that a node size will be used instead. The coordinates x and y represent an arbitrary coordinate system; for example, to produce a radial layout, a size of [360, radius] corresponds to a breadth of 360° and a depth of

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.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⟩.