This function collapses/expands a specified combo (a group of nodes) in a g6 graph, hiding its member nodes and edges while maintaining the combo itself visible. This is useful for simplifying complex graphs with multiple hierarchical groups.
Arguments
- graph
A g6 graph object or a g6_proxy object for Shiny applications.
- id
Character string specifying the ID of the combo to collapse/expand.
- options
List containing optional configuration parameters for the collapse/expand action:
animate
: Logical value indicating whether to animate the collapsing process. Default isTRUE
.align
: Logical value to ensure the position of expanded/collapsed nodes remains unchanged.