Cluster graphs allow toggling options (like visibility or highlights) per node. These node options are listed in the sidebar.



The graph here is from the GitAhead sample project. To generate it, find src/ui/DiffView.cpp, right click, and select “Cluster Call Internal” from the Graphical Views menu.


Right now, all the options are disabled. Options become enabled based on selected nodes. For instance, selecting HunkWidget enables these options:



Highlight Edges to Focus on Parts of the Graph
Try highlighting edges out of HunkWidget.



Highlighted edges are bolded, and unhighlighted edges become dashed. Nodes that are actively highlighting have a blue fill with white text, and nodes that are connected to a highlighted edge have a grey fill. Now that some part of the graph is highlighted, more options are enabled.


More than one node can be highlighted at a time. For example, try selecting FileWidget and highlighting edges in.



Clicking “Clear All Highlights” would return the graph to its initial state.


Hide Nodes to Remove Distractions
“Hide Nodes with No Highlighted Edges” will remove nodes from the graph that are not connected to any highlighted edges. Unhighlighted edges connecting the remaining nodes will still be visible.



There is also a control “Hide Unhighlighted Edges” that hides any unhighlighted edges.



Individual nodes can be hidden with the “Hide Selected Nodes” button.



Nodes that have been hidden with “Hide Selected Nodes” can be restored by clicking the “Show Hidden Nodes” button. Or, the menu next to the “Show Hidden Nodes” button lists all the hidden nodes, and specific nodes can be restored by checking them.



Undo/Redo/Restore Defaults
It’s easy to get lost with all the different options available. The “Restore Defaults” button is part of the top toolbar and will bring the graph back to its initial state.



Undo and Redo are also available. Undo can even undo “restore defaults.”


Expand Nodes to View Children
The default graph style shows any nodes with children as 3D boxes. Showing a nodes children turns it into a cluster. For example, showing HunkWidget’s children give the following graph:



Clusters control edge visibility. Edges into HunkWidget are highlighted for visibility.


Notice that a node like Header inside of HunkWidget has edges in that are internal to HunkWidget and an edge in from outside of HunkWidget. The “Show Edges Between Children” controls edges internal to HunkWidget.


Edges external to HunkWidget can be aggregated. Aggregated edges are still drawn, but end at the cluster boundary.


External edges can also be hidden.