chevron_right Demos chevron_right Hierarchical Layout with Compact Groups
Related demos
Book a live Demo

Live Demo — yFiles in Action

30–45 min | Online | No install required

For Developers, Product Mangers & Executives

  • Interactive graph visualization in real time
  • Integration example
  • Live Q&A and next step recommendations

30–45 minutes | 1:1 or team session | Online (Zoom / Teams)

No install required | We show live code

Book a free live demo

Live Demo — yFiles in Action

30–45 min | Online | No install required

For Developers, Product Mangers & Executives

30–45 minutes | 1:1 or team session | Online (Zoom / Teams)

No install required | We show live code

Book a free live demo

Hierarchical Layout with Compact Groups

This demo shows how to configure the HierarchicalLayout and the corresponding CoordinateAssigner to draw compacter group nodes than default.

Layer Compaction

The width of group nodes (for left-to-right layouts) can be reduced by enabling recursive group layering with compaction. This minimizes the number of layers a group spans.

In this demo, you can observe the effect on 'Group 3', which shares its first layer with 'Group 2' when compaction is enabled.

Vertical (Orthogonal) Compaction

To further compact groups in the direction orthogonal to the main layout flow (i.e., height for left-to-right layouts), enable groupCompaction.

Things to Try

Click the button in the toolbar to toggle between hierarchical layout with and without compact groups.

Documentation