PlotlyReact
Wolfram Kernel
PlotlyReact[p_PlotlyInstance, data_Association, opts___]PlotlyReact[p_PlotlyInstance, {data_Association ..}, layout_Association, opts___]fully recreates a graph using provided data (it is faster than reevaluation)
See the official reference
For example
p = Plotly[<|"type"->"line", "y"->{1,2,3,4,5,6}|>]And now we can update the whole graph using different data
PlotlyReact[p, {<|"type"->"scatter", "y"->110{5,2,3,4,5,6}, "x"->{1,2,3,4,5,6}|>}];Options
"Window"
By default, the "Window" option is set to "Inherited". This setting dynamically uses the currently active window associated with the PlotlyInstance.
When set to "Inherited", even if a new window is opened using the same instance, it will be detected automatically. This is possible because all PlotlyInstance objects perform a handshake after mounting on the page.
To override this behavior, you can provide a specific WindowObj as an option.