The DendrogramNodePlacer arranges subtrees as dendrograms.
Remarks
Layout Style
This ITreeLayoutNodePlacer arranges nodes from top to bottom. It arranges subtrees in such a way that all subtrees of a single local root are aligned with their bottom border.
Note: This implementation does not support PortConstraints.
Default Values of Properties
minimumRootDistance | 30 | |
minimumSubtreeDistance | 30 |
Type Details
- yfiles module
- layout-tree
- yfiles-umd modules
- layout-orthogonal-compact, layout-orthogonal, layout-tree, layout
- Legacy UMD name
- yfiles.tree.DendrogramNodePlacer
See Also
Constructors
Creates a new DendrogramNodePlacer instance with default settings.
Parameters
A map of options to pass to the method.
- minimumRootDistance - number
The minimum distance between the SubtreeShape of a root node and the bus connecting to all of its children. This option sets the minimumRootDistance property on the created object.
- minimumSubtreeDistance - number
The minimum horizontal distance between adjacent SubtreeShapes. This option sets the minimumSubtreeDistance property on the created object.
Properties
Gets or sets the minimum distance between the SubtreeShape of a root node and the bus connecting to all of its children.
Remarks
Default Value
30
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified distance is negative
Sample Graphs
Gets or sets the minimum horizontal distance between adjacent SubtreeShapes.
Remarks
Default Value
30
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified distance is negative
Sample Graphs
Methods
Creates a IComparer<T> that sorts outgoing edges according to the x-coordinate of their target nodes.
Creates a IComparer<T> for the edges which takes the initial x-coordinates of the nodes into account.
Remarks
Returns
- ↪IComparer<any>
- the IComparer<T> for the edges
See Also
Implements
Creates an optional IProcessor for pre- and post-processing.
Remarks
null
. Hence, no pre- or post-processing is done.Parameters
A map of options to pass to the method.
- layouter - TreeLayout
- the current TreeLayout instance
- graph - LayoutGraph
- the input graph
- currentRoot - YNode
- the root node handled by this ITreeLayoutNodePlacer
Returns
- ↪IProcessor
null
Implements
Provides NORTH for all children.
Remarks
Parameters
A map of options to pass to the method.
- localRoot - YNode
- the local root node
- connectorMap - IDataMap
- the map that is used for storing the direction specifiers of the child nodes
Domain YNode a child node of the local root Values number the direction specifier assigned to the child node
Implements
placeSubtree
(nodeShapeProvider: IDataProvider, subtreeShapeProvider: IDataProvider, graph: LayoutGraph, localRoot: YNode, parentConnectorDirection: ParentConnectorDirection) : SubtreeShapeArranges the SubtreeShapes of the local root and its children as a dendrogram.
Parameters
A map of options to pass to the method.
- nodeShapeProvider - IDataProvider
- the IDataProvider for obtaining an initial shape of the root node
Domain YNode Values SubtreeShape the shape of the node - subtreeShapeProvider - IDataProvider
- the IDataProvider for accessing the pre-calculated shapes of the subtrees
Domain YNode Values SubtreeShape the shape of the subtree rooted at the node - graph - LayoutGraph
- the input graph
- localRoot - YNode
- the root of the subtree that should be arranged by this method
- parentConnectorDirection - ParentConnectorDirection
- the direction specifier for the connector of the local root node to its parent node
Returns
- ↪SubtreeShape
- the combined shape of the whole subtree rooted at the given local root node