documentationfor yFiles for HTML 3.0.0.3

LayoutGraphGrouping

Provides access to the hierarchical structure of a LayoutGraph in the form of a grouping tree.

Inheritance Hierarchy
LayoutGraphGrouping

Remarks

The hierarchy is represented as a tree where group nodes are the parents of the nodes they contain. Group nodes can contain both normal nodes and other group nodes, and all top-level nodes are children of a virtual root node.

This class caches the hierarchical structure of the graph when instantiated. Therefore, subsequent modifications to the graph may not be reflected in the current instance.

When group nodes are copied or replaced, the original hierarchy should be restored by calling the restore method to avoid inconsistencies.

The following example shows a hierarchical graph containing group nodes, illustrating how nodes are nested inside group nodes:

The figure below shows the tree representing the hierarchical structure of the grouped graph. The labels in the hierarchy tree correspond to nodes from the grouped graph, and group nodes are treated as the parents of their contents.

This class cannot be instantiated

Type Details

yFiles module
algorithms
If the state of the graph is modified (e.g., by adding or removing nodes), the current LayoutGraphGrouping instance should be disposed and replaced with a new one. Failure to do so may result in outdated or invalid data.

Properties

Methods

Static Methods