I would advise using Plotly.react instead of newPlot and relayout.
This will simplify your code and instead of rebuilding a whole new plot it just redraws the styling and traces.
plotly.react docs
I actually wrote a tiny implementation of your bigger idea of embedding vuejs in plotly.js
I would advise using Plotly.react instead of newPlot and relayout. This will simplify your code and instead of rebuilding a whole new plot it just redraws the styling and traces. plotly.react docs I actually wrote a tiny implementation of your bigger idea of embedding vuejs in plotly.js
https://medium.com/@bobthomas295/vuejs-and-plotly-js-reactive-charts-da9b3b59f2dc
Here you can see how easy it is to use the Plotly.react and the speed you get with it.