powered by
Creates a configuration object for the collapse-expand behavior in G6. This allows users to collapse or expand nodes/combos with child elements.
collapse_expand( key = "collapse-expand", animation = TRUE, enable = TRUE, trigger = "dblclick", onCollapse = NULL, onExpand = NULL, align = TRUE, ... )
A list with the configuration settings for the collapse-expand behavior.
Behavior unique identifier. Useful to modify this behavior from JS side.
Enable expand/collapse animation effects (boolean, default: TRUE).
Enable expand/collapse functionality (boolean or function, default: TRUE).
Trigger method: "click" or "dblclick" (string, default: "dblclick").
Callback function when collapse is completed (function, default: NULL).
Callback function when expand is completed (function, default: NULL).
Align with the target element to avoid view offset (boolean, default: TRUE).
Extra parameters. See https://g6.antv.antgroup.com/en/manual/behavior/collapse-expand.
# Basic configuration config <- collapse_expand()
Run the code above in your browser using DataLab