E

ChildOrderingPolicy

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.

Members

No filters for this type

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.
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).
static

Sample Graphs

ShownSetting: Node ordering according to (alternating) subtree sizes

See Also

API
childOrderingPolicy
Child ordering policy which preserves the initial order of child nodes around their parent.
The original circular order of child nodes around their parent nodes will be maintained according to the initial coordinates.
static

Sample Graphs

ShownSetting: Example of initial graph with child ordering from smallest to largest node

See Also

Developer's Guide
API
childOrderingPolicy
Child ordering policy which sorts the child nodes according to their wedge angles.
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.
static

Sample Graphs

ShownSetting: Node ordering according to wedge angles

See Also

API
childOrderingPolicy

Static Methods

Converts the given argument to an enum constant of this enum type.
Most notably, this method can convert an enum constant's name into the enum constant itself.
static

Parameters

value: ChildOrderingPolicy
The value to convert to an enum constant.

Return Value

ChildOrderingPolicy
The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
static

Parameters

value: ChildOrderingPolicy
The numeric value of an enum constant.

Return Value

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.