The DendrogramSubtreePlacer arranges subtrees in a dendrogram-like style.
Remarks
Layout Style
This ISubtreePlacer 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.
Default Values of Properties
minimumRootDistance | 30 | |
minimumSubtreeDistance | 30 |
Type Details
- yFiles module
- algorithms
See Also
Constructors
Creates a new DendrogramSubtreePlacer 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
.Property Value
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
.Property Value
Throws
- Exception({ name: 'ArgumentError' })
- if the specified distance is negative
Sample Graphs
Methods
Creates a comparison that sorts outgoing edges according to the x-coordinate of their target nodes.
Remarks
Returns
- ↪function(LayoutEdge, LayoutEdge):number
- the comparison
Signature Details
function(x: LayoutEdge, y: LayoutEdge) : number
Encapsulates a method that compares two objects.Parameters
- x - LayoutEdge
- The first object to compare.
- y - LayoutEdge
- The second object to compare.
Returns
- number
- An integer value which is
<0
ifx
is less thany
,0
ifx
is equal toy
, or>0
ifx
is greater thany
Implements
createProcessor
(treeLayout: TreeLayout, graph: LayoutGraph, currentRoot: LayoutNode) : ISubtreePlacerProcessorCreates an optional ISubtreePlacerProcessor 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.
- treeLayout - TreeLayout
- the current TreeLayout instance
- graph - LayoutGraph
- the input graph
- currentRoot - LayoutNode
- the root node handled by this ISubtreePlacer
Returns
- ↪ISubtreePlacerProcessor?
null
Implements
determineChildConnectors
(localRoot: LayoutNode, connectorMap: IMapper<LayoutNode,ParentConnectorDirection>)Provides UP for all children.
Remarks
Parameters
A map of options to pass to the method.
- localRoot - LayoutNode
- The local root node
- connectorMap - IMapper<LayoutNode,ParentConnectorDirection>
- The IMapper<K,V> that is used for storing the direction specifiers of the child nodes
Implements
placeSubtree
(nodeShapeProvider: IMapper<LayoutNode,SubtreeShape>, subtreeShapeProvider: IMapper<LayoutNode,SubtreeShape>, graph: LayoutGraph, localRoot: LayoutNode, 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 - IMapper<LayoutNode,SubtreeShape>
- the IMapper<K,V> for obtaining an initial shape of the root node
- subtreeShapeProvider - IMapper<LayoutNode,SubtreeShape>
- the IMapper<K,V> for accessing the pre-calculated shapes of the subtrees
- graph - LayoutGraph
- the input graph
- localRoot - LayoutNode
- 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