Layout Features Tutorial

Incremental Hierarchic Layout

This demo shows how to run the hierarchic layout algorithm on a predefined subset of nodes (and edges) in a graph.

To achieve this, two setup steps are necessary:

First, the algorithm has to be told to work on a subset only. To do so, HierarchicLayout's layout mode property has to be set to incremental.

Second, the algorithm has to be told which set of nodes (and edges) to rearrange. The class HierarchicLayoutData offers the property incrementalHints for this purpose.

In this demo, the algorithm works on the subset of turquoise nodes only.

Click the button in the toolbar to run the layout and see the effect.

Code Snippet

You can copy the code snippet to configure the layout from GitHub.

Demos

You can also take a look at more extensive demos that take advantage of this feature:

  • Incremental Hierarchic Demo
  • Decision Tree Demo
  • Collapse Demo
  • Network Flows Demo

Documentation

The Developer's Guide has detailed information about the hierarchic layout algorithm in general and about how to run the algorithm on a subset of nodes specifically.