This function adds one or more nodes/edges/combos to an existing g6 graph instance using a proxy object. This allows updating the graph without completely re-rendering it.
g6_add_nodes(graph, nodes)g6_add_edges(graph, edges)
g6_add_combos(graph, combos)
g6_add_data(graph, data)
The g6_proxy object (invisibly), allowing for method chaining.
A g6_proxy object created with g6_proxy
.
A data frame or list specifying the elements to be added. Elements structure must be compliant with specifications listed at https://g6.antv.antgroup.com/manual/element/overview
A nested list possibly containing nodes, edges and combo data.
This function can only be used with a g6_proxy object within a Shiny application. It will not work with regular g6 objects outside of Shiny.
If a node with the same ID already exists, it will not be added again. See https://g6.antv.antgroup.com/en/api/data#graphaddnodedata, https://g6.antv.antgroup.com/en/api/data#graphaddedgedata and https://g6.antv.antgroup.com/en/api/data#graphaddcombodata for more details.
g6_proxy
, g6_remove_nodes