Specifies the ordering policies for child nodes under the same parent in a TreeLayout.
Remarks
This enumeration provides different strategies for ordering child nodes around their parent node. Each policy affects how child nodes are positioned relative to each other, impacting the overall appearance and compactness of the layout. The ordering strategies include arranging nodes based on subtree sizes, wedge angles, or preserving the original order.
Type Details
- yFiles module
- algorithms
Constants
Child ordering policy which orders child nodes depending on their subtree size such that large subtrees are placed next to small ones in order to save space.
Remarks
The actual area of a subtree is used as the subtree size. The smallest subtree is placed next to the largest subtree, followed by the second smallest subtree and so on. This way, drawings can become more compact, because the adjacent placement of large subtrees is avoided (which would require edges to become longer for subtrees to fit next to each other).
See Also
Sample Graphs
Child ordering policy which preserves the initial order of child nodes around their parent.
Remarks
The original circular order of child nodes around their parent nodes will be maintained according to the initial coordinates.
See Also
Sample Graphs
Child ordering policy which sorts the child nodes according to their wedge angles.
Remarks
The node with the greatest angle gets median position in the sorting order. The smaller the wedges, the farther away a node will be placed from the median position. Using this policy, the produced results are often more symmetric.
See Also
Sample Graphs
Static Methods
Converts the given argument to an enum constant of this enum type.
Remarks
Most notably, this method can convert an enum constant's name into the enum constant itself.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - ChildOrderingPolicy
- The value to convert to an enum constant.
Returns
- ↪ChildOrderingPolicy
- The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - ChildOrderingPolicy
- The numeric value of an enum constant.
Returns
- ↪string
- The name of the enum constant.
Throws
- Exception({ name: 'Error' })
- If this type is a flags enums, and the provided value doesn't correspond to a single enum constant, or if this enum type contains no constant of the given numeric value.