plotly / react-plotly.js

A plotly.js React component from Plotly 📈
MIT License
1.01k stars 135 forks source link

Is it possible to add some sort of loading spinner to this component ? #310

Open GeorgeFlorian opened 1 year ago

GeorgeFlorian commented 1 year ago

I am wondering how can I display a loading spinner while the chart is being rendered. I have a choropleth map with a lot of data and it takes a while for it to finish rendering. I would like to display a spinner until the chart has finished rendering.

Is this possible ?

Jonhyfun commented 1 year ago

Have you tried using React Suspense?

I achieved a pretty great loading state by wrapping the chart component in a suspense. The only issue is when there really is TOO much data or a complex to render graph like the 3d chart, in that case suspense still helps, but it does freeze just before rendering