The specified root hierarchy.
Returns the current inner padding function.
Returns the current inner padding function.
Sets the inner and outer padding to the specified number and returns this treemap layout.
The specified padding value.
Sets the inner and outer padding to the specified function and returns this treemap layout.
The specified padding function.
Returns the current bottom padding function, which defaults to the constant zero.
Returns the current bottom padding function, which defaults to the constant zero.
Sets the bottom padding to the specified number and returns this treemap layout. The bottom padding is used to separate the bottom edge of a node from its children.
The specified bottom padding value.
Sets the bottom padding to the specified function and returns this treemap layout. The function 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.
The specified bottom padding function.
Returns the current inner padding function, which defaults to the constant zero.
Returns the current inner padding function, which defaults to the constant zero.
Sets the inner padding to the specified number and returns this treemap layout. The inner padding is used to separate a node’s adjacent children.
The specified inner padding value.
Sets the inner padding to the specified function and returns this treemap layout. The function is invoked for each node with children, being passed the current node. The inner padding is used to separate a node’s adjacent children.
The specified inner padding function.
Returns the current left padding function, which defaults to the constant zero.
Returns the current left padding function, which defaults to the constant zero.
Sets the left padding to the specified number and returns this treemap layout. The left padding is used to separate the left edge of a node from its children.
The specified left padding value.
Sets the left padding to the specified function and returns this treemap layout. The function 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.
The specified left padding function.
Returns the current top padding function.
Returns the current top padding function.
Sets the top, right, bottom and left padding to the specified function and returns this treemap layout.
The specified padding outer value.
Sets the top, right, bottom and left padding to the specified function and returns this treemap layout.
The specified padding outer function.
Returns the current right padding function, which defaults to the constant zero.
Returns the current right padding function, which defaults to the constant zero.
Sets the right padding to the specified number and returns this treemap layout. The right padding is used to separate the right edge of a node from its children.
The specified right padding value.
Sets the right padding to the specified function and returns this treemap layout. The function 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.
The specified right padding function.
Returns the current top padding function, which defaults to the constant zero.
Returns the current top padding function, which defaults to the constant zero.
Sets the top padding to the specified number and returns this treemap layout. The top padding is used to separate the top edge of a node from its children.
The specified top padding value.
Sets the top padding to the specified function and returns this treemap layout. The function 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.
The specified top padding function.
Returns the current rounding state, which defaults to false.
Enables or disables rounding according to the given boolean and returns this treemap layout.
The specified boolean flag.
Returns the current size, which defaults to [1, 1].
Sets this treemap layout’s size to the specified [width, height] array and returns this treemap layout.
The specified two-element size array.
Returns the current tiling method, which defaults to d3.treemapSquarify
with the golden ratio.
Returns the current tiling method, which defaults to d3.treemapSquarify
with the golden ratio.
Sets the tiling method to the specified function and returns this treemap layout.
The specified tiling function.
Lays out the specified root hierarchy. You must call
root.sum
before passing the hierarchy to the treemap layout. You probably also want to callroot.sort
to order the hierarchy before computing the layout.