react-plotly.js icon indicating copy to clipboard operation
react-plotly.js copied to clipboard

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

Open GeorgeFlorian opened this issue 2 years ago • 1 comments

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 ?

GeorgeFlorian avatar Jan 26 '23 15:01 GeorgeFlorian

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

Jonhyfun avatar Aug 25 '23 16:08 Jonhyfun