We can change the layout of an existing plot with Plotly.relayout, change the data with Plotly.react, but how to change the config of a plot without changing the other parameters?
Example:
// happens when clicking on a button
var config = element.config; // problem: this doesn't exist! <-- how to get the current config state of the plot?
config["staticPlot"] = true; // let's add a configuration parameter
Plotly.react(element.id, element.data, element.layout, config)
How to get element.config in the same way element.layout and element.data exist?