What Nested Graph Hierarchy basically provides is the possibility to put a graph inside a node which itself is contained in another graph. A node that contains another graph is called an anchor node or a closed group node. A tree-like hierarchy of nodes will be induced by a nesting of nodes or whole graphs inside of other nodes. The top-level graph of this hierarchy of graphs is called the root graph. A graph that contains a nested graph is called the parent graph of that nested graph.
Alternatively yEd makes it possible to logically put nodes into a group node, but visualize them on the same level as the group node itself. In contrast to the first variant, such a group node is considered to be open. This technology allows visualizing edges in their entirety, even if their end points reside on different levels in the node hierarchy.
![]() |
A noteworthy feature of the yFiles Nested Graph Hierarchy is that one can move part a graph to another level within the hierarchy of graphs and groups. The edges connecting the part that has been moved with the rest of the graph won't get lost though even if the group nodes get closed. Original edges will be represented by edges connecting to the node the subgraph is nested in. When opening group nodes or unpacking the contents of a group node again, the original edges will be restored. Hence the structure of a graph won't be destroyed by a sequence of nesting operations.
yEd displays three different views of a grouped and nested graph hierarchy at the same time. On the left there is a classic tree view that shows the complete graph's node hierarchy and all of the nodes contained within it. The main view of the editor displays the graph hierarchy from a specific hierarchy level downward. The graphs that are nested within closed group nodes are displayed optionally as well, whereas the contents of open groups are visualized at all times recursively. The third view is located above the tree view. It acts as an overview display of the graph which is shown in the main view.
This section describes which node hierarchy-related operations there are available within the main view.
The menu bar contains one additional menu labeled 'Hierarchy', which provides access to the following items.
Icon | Menu Item | Description |
---|---|---|
![]() |
View Parent | View the parent graph of the currently display graph in the main view. This operation is only available if the graph displayed in the main view is not the root graph. |
![]() |
View Group | View the contents of the group node on which the popup menu has been opened alone. |
Group Selection | Selected nodes will be grouped. This is done by creating a new group node and making the selected nodes logically children of the newly created group node. If no nodes are selected, a new empty open group node will be created. | |
Ungroup Selection | Selected nodes will be ungrouped, i.e. they will become child nodes of the parent of their current parent node. Empty group nodes will not be removed, but stay in the graph structure. | |
Open Selected Groups | Opens the currently selected group nodes. This is the reverse operation of Close Selected Groups. | |
Close Selected Groups | This action can be invoked on selected group nodes. This will actually switch the nodes from being open group nodes to being closed group nodes that contain the child nodes in a separate graph. This can be undone by invoking Open Selected Groups on the closed group node. | |
Ungroup All | This will recursively ungroup all nodes of all selected groups within the displayed graph. | |
By right clicking on the main view a popup menu will become visible. As a convenience the menu contains the more frequently used entries of the Hierarchy Menu.
There are some additional hierarchy-related operations available on the main view that are triggered by mouse gestures.
Double-clicking on a node that is displayed
in the tree view transfers the focus of the main view
to that node.
Focusing a node in the main view involves two things:
The closed group node that contains the focused node gets
displayed in the main view. And the focused node will
be centered and focused in the view.
Clicking on an item and editing its name will change the label text in the
document.