statnett / vue-plotly

A vue wrapper for plotly.js chart library
MIT License
119 stars 28 forks source link

New plot is very expensive for frequent data changes. #10

Closed Bob-Thomas closed 5 years ago

Bob-Thomas commented 6 years ago

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.

mokkabonna commented 5 years ago

Fixed in 14b8c07

Bob-Thomas commented 5 years ago

Sweet

manthey commented 5 years ago

Should the window autoresize listener use react rather than newPlot?

mokkabonna commented 5 years ago

Fixed