Leveling Strategy
The layout algorithm partitions the nodes into levels.
The leveling strategy specifies how the levels are calculated.
Besides the leveling strategy, layout constraints, level indexes and
the incremental mode also influence how the levels are calculated.
If the incremental mode is disabled, the leveling strategy determines
the levels of all nodes that are not subject to layout constraints and
level index specifications.
The valid values for the strategy are:
Semi-Optimal
(the default) -
This produces often the same result as the optimal strategy, but it is quicker. The layout algorithm uses a heuristic to minimize the sum of level distances for all edges. It pulls root nodes to the highest-numbered possible level and leaf nodes to the lowest-numbered possible level.
Optimal
-
This uses an algorithm that minimizes the sum of level distances for all edges. The optimal strategy is slower than the other strategies, but often produces the best result.
Higher levels
-
Nodes have a tendency to use the possible level with the highest level number. All leaf nodes will be at the highest-numbered level. All root nodes are pulled to high-numbered levels as much as possible.
Lower levels
-
Nodes have a tendency to use the possible level with the lowest level number. All root nodes will be at level 0. All leaf nodes are pulled to low-numbered levels as much as possible.
Spread out
-
This is a combination of the "lower level" and "higher level" strategy. All root nodes will be at level 0. All leaf nodes will be at the highest-numbered level. All inner nodes are at balanced positions.