OptionaldepthOptionalhorizontalShould the nodes be placed horizontally rather than vertically
OptionallevelMultiplies the distance between consecutive levels — the depth axis of the tree, or
the gap between rings in radial mode. At 1 the tree is scaled to fill the canvas.
OptionalparentName of the node.data key holding the id of the node's parent in the hierarchy.
Leave undefined — the default — and parenthood is derived from the edges, as it always was. Name a key and each node that carries it is attached to the node it names, whether or not an edge joins them; a branch declared without an edge is drawn without a line. A key naming a node that is not being laid out, or one that would close a cycle, is dropped for that node, which falls back to the edges.
Ignored while rootId is set: pinning a root re-derives every parent from the
edges, which is what makes the root picker able to re-hang a declared tree.
OptionalradialShould the nodes be placed radially instead of vertically
The grap between each layers used in the radial mode
OptionalrootSpecify the ID of the node to be used as the root of the tree.
Keep undefined to let rooIdAlgorithmFinder to select it.
The algorithm to use to find the root of the tree
OptionalsiblingMultiplies the distance between nodes within a level — the breadth axis.
Ignored in radial mode, where a level always spans the full circle.
OptionalspacingWhether the two spacing multipliers tune themselves from the size of the nodes and the shape of the tree, or stay exactly where they are put.
'auto' is the default — except for a tree that sets levelSpacing or
siblingSpacing explicitly, which is taken as having made up its mind. Turning
either multiplier by hand afterwards also leaves auto, permanently.
OptionalstrengthThe strength of the force keeping the nodes placed to form a tree in place
Name of the
node.datakey holding the row the node should sit on, counting from0at the shallowest root.Leave undefined — the default — and a node sits one row below its parent. Name a key and each node that carries it is pushed down to the row it asks for, the gap filled with empty rows. This is how the roots of a multi-tree graph are put on different rows: give one of them a depth of
2and its whole tree starts there.A row can only ever push a node further down: a tidy tree cannot place a child above its parent, so a depth that is not below the parent's is clamped to
parent + 1. Empty rows take up real space, so a large depth on a shallow graph squeezes every row —levelSpacingis the way back out.