Remarks
Default Values of Properties
| Name | Default | Description |
|---|---|---|
| groupCompaction | false | No group compaction is performed. |
| horizontalCompaction | false | |
| labelCompaction | false | |
| layoutGridCrossingWeight | 0.0 | The algorithm ignores edges crossing grid borders. |
| maximumPortDeviation | 3.0 | Ports may only move very short distances. |
| minimumSublayerDistance | 15.0d | |
| nodeCompaction | false | Nodes are not placed in a compact style. |
| stopDuration | TimeSpan.MAX_VALUE | The layout algorithm runs unrestricted. |
| symmetryOptimizationStrategy | SymmetryOptimizationStrategy.STRONG |
See Also
Developer's Guide
Members
Constructors
Properties
Gets or sets whether or not the CoordinateAssigner should improve the horizontal compactness of group nodes.
Property Value
true if group compaction should be enabled, false otherwiseDefault Value
Gets or sets whether or not the CoordinateAssigner tries to create a maximally compact horizontal layout at the cost of more bends.
Property Value
true if a maximally compact horizontal layout is created, false otherwiseDefault Value
See Also
Gets or sets whether or not the CoordinateAssigner places labels in a more compact style.
Property Value
true if labels are placed compact, false otherwiseDefault Value
Allowing straightening (values > 0) produces non-uniform port distributions and may violate the edge distance (HierarchicalLayout.edgeDistance) and the border-to-port gap implied by HierarchicalLayoutNodeDescriptor.borderToPortGapRatio.
With the small default value, these deviations are typically hard to notice. For pixel-precise adherence to these constraints, set this property to zero. Large values are not recommended, as results may look less balanced despite having fewer bends.
Fixed ports are never moved. The algorithm also does not introduce additional edge overlaps.
Property Value
0, ports are never moved to straighten edges.Default Value
Sample Graphs
A too small distance value may prevent adjacent nodes from being placed in a stacked style (horizontally interleaving) because the vertical distance between these nodes must be greater than or equal to the value specified by HierarchicalLayoutNodeDescriptor.minimumDistance.
Values should be greater than 0.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if minimum sublayer distance is negative
Default Value
Sample Graphs
15.0dSee Also
Property Value
true if nodes are placed in a compact style, false otherwiseDefault Value
Sample Graphs
falseSee Also
Developer's Guide
API
- minimumSublayerDistance
Gets or sets the time limit set for the layout algorithm.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the stop duration is negative
Default Value
Gets or sets the optimization strategy for the symmetry of the resulting layout.
Property Value
- Strong – Symmetry is prioritized over performance and other layout qualities like compactness.
- Weak – Symmetry is prioritized over performance but not over other layout qualities like compactness.
- None – Symmetry is not prioritized.
Default Value
Sample Graphs
See Also
Developer's Guide
Methods
Assigns preliminary y-coordinates for each layer of a hierarchical layout.
Parameters
- graph: LayoutGraph
- The input graph
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext containing information about the elements, as well as the HierarchicalLayoutContext.layers that will be calculated by this method.
Parameters
- graph: LayoutGraph
- the input graph
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext containing information about the elements, as well as the HierarchicalLayoutContext.layers that will be calculated by this method.
- drawingDistanceCalculator: IDrawingDistanceCalculator
- the given IDrawingDistanceCalculator instance
Parameters
- graph: LayoutGraph
- the graph that contains the nodes
- layer: HierarchicalLayoutLayer
- the layer that contains the nodes
- predNode: LayoutNode
- the node to the left of the other one, may be
nullto indicate a border line - succ: LayoutNode
- the node to the right of the other one, may be
nullto indicate a border line
Return Value
- number
- the minimum distance allowed between those two nodes ( >=0 )
See Also
Returns the minimum height of a given layer.
Parameters
- graph: LayoutGraph
- the given graph
- context: HierarchicalLayoutContext
- the HierarchicalLayoutContext instance which provides access to the HierarchicalLayoutNodeContext and HierarchicalLayoutEdgeContext instances
- layer: HierarchicalLayoutLayer
- the layer whose height is calculated
Return Value
- number
- the minimum height
Returns whether the given node should be treated as a node with fixed (given) coordinates, that is, its hint is IncrementalNodeHint.EXACT_COORDINATES or created via factory method IncrementalNodeHint.createExactCoordinatesHint.
This callback method is used by both assignLayerCoordinates and assignSequenceCoordinates.
If inLayer argument is true, this method is called from within the method assignLayerCoordinates.
Parameters
- graph: LayoutGraph
- the given graph
- layoutContext: HierarchicalLayoutContext
- the HierarchicalLayoutContext instance which provides access to the HierarchicalLayoutNodeContext and HierarchicalLayoutEdgeContext instances
- node: LayoutNode
- the given node
- inLayer: boolean
trueif the layer coordinate of the node is queried,falseif the sequence coordinate is queried
Return Value
- boolean
trueif the node should be treated as fixed,falseotherwise