Skip to contents

This function creates a proxy object that can be used to update an existing g6 graph instance after it has been rendered in the UI. The proxy allows for server-side modifications of the graph without completely re-rendering it.

Usage

g6_proxy(id, session = shiny::getDefaultReactiveDomain())

Arguments

id

Character string matching the ID of the g6 graph instance to be modified.

session

The Shiny session object within which the graph exists. By default, this uses the current reactive domain.

Value

A proxy object of class "g6_proxy" that can be used with g6 proxy methods such as g6_add_nodes(), g6_remove_nodes(), etc.

Details

This function must be called from within a Shiny server function. The returned proxy object contains a reference to the session and the ID of the graph to be modified.