alonho / angular-plotly

MIT License
41 stars 35 forks source link

Plotly error "Resize must be passed a displayed plot div element." #26

Open gdurand opened 6 years ago

gdurand commented 6 years ago

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.

pfeatherstone commented 4 years ago

i think we should use Plotly.relayout instead of Plotly.plots.resize