Organize complex graphs with nested graphs, or subgraphs.
Large, complex graphs can be difficult to understand. To simplify a graph, you can collapse part of it into levels of nested graphs, called subgraphs. This makes the overall graph easier to read. You can also focus on the content within the subgraphs with less visual distraction.
This information covers nested graphs only. For information on other ways to organize graphs, refer to Organize graphs.
Before you can use nested graphs, you must:
Create subgraphs to simplify the graph. Expand subgraphs to undo the nesting and return the content to a higher level of the graph.
To add a subgraph:
Add GraphOptions.SupportsSubgraph in the Graph attribute’s options parameter:
[Graph(AssetExtension, GraphOptions.SupportsSubgraphs)]
Create a subgraph node.
To create a local subgraph, use one of the following methods:
To add another local subgraph if one exists in the graph:
To create an asset subgraph, you must already have a graph asset with a valid subgraph type. To create the asset subgraph, use one of the following methods:
Drag a graph asset from the Project windowA window that shows the contents of your Assets folder (Project tab) More info
See in Glossary into the Graph window.
Create the asset subgraph from the Add a graph node window:
A subgraph node appears. It has a different shape from other nodes. A subgraph node has a tab on top.
To view a subgraph in detail and interact with its contents, open the subgraph. You can open the subgraph through one of these methods:
After you open the subgraph, the canvas and the MiniMap window show only the contents of the subgraph.
To close the subgraph and return to a higher level of the graph, use the breadcrumbs at the top of the Graph view to select the graph or subgraph you want to view.
After you close the subgraph, the canvas and the MiniMap window show the level of the graph that you selected.
To return the contents of a subgraph to a higher level of the graph:
Navigate to the level of the graph with the subgraph node.
Extract the contents of the subgraph through one of the following steps:
After you extract the subgraph, its contents appear on a placemat one level higher in the graph. The placemat title is the name of the subgraph. If you extract a subgraph that had subgraphs nested inside it, the nested subgraphs will appear as subgraph nodes on the placemat.
To delete the subgraph and its contents:
After you delete the subgraph, the subgraph node and its contents disappear from the graph.