The DendrogramSubtreePlacer arranges subtrees in a dendrogram-like style.
Implements
- I
- I
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
| Name | Default |
|---|---|
| minimumRootDistance | 30 |
| minimumSubtreeDistance | 30 |
See Also
Developer's Guide
Members
No filters for this type
Constructors
Creates a new DendrogramSubtreePlacer instance with default settings.
Creates a new DendrogramSubtreePlacer instance with default settings.
Parameters
Properties
Gets or sets the minimum distance between the SubtreeShape of a root node and the bus connecting to all of its children.
Gets or sets the minimum distance between the SubtreeShape of a root node and the bus connecting to all of its children.
The distance needs to be non-negative.
final
Property Value
the minimum distance between the root and the bus
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified distance is negative
Default Value
The default value is: 30
Sample Graphs
ShownSetting:
30Gets or sets the minimum horizontal distance between adjacent SubtreeShapes.
Gets or sets the minimum horizontal distance between adjacent SubtreeShapes.
The distance needs to be non-negative.
final
Property Value
the minimum distance between two adjacent SubtreeShapes
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified distance is negative
Default Value
The default value is: 30
Sample Graphs
ShownSetting:
30Methods
Creates a comparison that sorts outgoing edges according to the x-coordinate of their target nodes.
Creates a comparison that sorts outgoing edges according to the x-coordinate of their target nodes.
This comparison can be used for achieving a From Sketch layout.
final
Return Value
- function(LayoutEdge, LayoutEdge): number
- the comparison
Creates an optional ISubtreePlacerProcessor for pre- and post-processing.
Creates an optional ISubtreePlacerProcessor for pre- and post-processing.
This implementation returns
null. Hence, no pre- or post-processing is done.Parameters
- treeLayout: TreeLayout
- the current TreeLayout instance
- graph: LayoutGraph
- the input graph
- currentRoot: LayoutNode
- the root node handled by this ISubtreePlacer
Return Value
Implements
ISubtreePlacer.createProcessordetermineChildConnectors
(localRoot: LayoutNode, connectorMap: IMapper<LayoutNode, ParentConnectorDirection>)Provides UP for all children.
determineChildConnectors
(localRoot: LayoutNode, connectorMap: IMapper<LayoutNode, ParentConnectorDirection>)Provides UP for all children.
Edges will always connect to the top of the child nodes.
final
Parameters
- 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
ISubtreePlacer.determineChildConnectorsArranges the SubtreeShapes of the local root and its children as a dendrogram.
Arranges the SubtreeShapes of the local root and its children as a dendrogram.
final
Parameters
- 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
Return Value
- SubtreeShape
- the combined shape of the whole subtree rooted at the given local root node