Hierarchical Layout with Constraints
This demo shows how to customize the assignment of the nodes to the layers (layering) and
the order of the nodes in a layer (sequencing) when using the
Hierarchical Layout.
Layer constraints
The layout is configured such that
node 5 follows node 4 on the same
layer. When using the default Hierarchical Layout,
node 5 is placed on the next layer.
Sequence constraints
The only configured sequence constraint is that
node 5
follows after node 4.
Click the button in the toolbar to toggle between
Hierarchical Layout with and without configured
constraints.
Code Snippet
You can copy the code snippet to configure the layout from
GitHub.
Demos
See the Layer Constraints Demo and the Sequence Constraints Demo
for more elaborate examples of the constraints functionality.
Documentation
See the
Constrained Layer Assignment
and
Constrained Node Sequencing
sections in the Developer's Guide for an in-depth discussion of the relevant concepts.