angular-plotly
angular-plotly copied to clipboard
Plotly error "Resize must be passed a displayed plot div element."
When resizing a window while a plot is not visible, plotly logs this error.
To fix this you can add this test in onResize() (the same check as in plotly that triggers this error):
let e = window.getComputedStyle(graph).display;
if ( !e || "none" === e) return;
I don't know if this has an impact on the onResize() functionality.
i think we should use Plotly.relayout instead of Plotly.plots.resize