dash-bootstrap-components icon indicating copy to clipboard operation
dash-bootstrap-components copied to clipboard

Graphs in tabs example not rendering

Open glsdown opened this issue 1 year ago • 2 comments

What is happening?

On the documentation site, the "graphs in tabs" example isn't rendering any data.

image

image

This is on Google Chrome as well as Safari on iPhone.

What should be happening?

Data should appear on the graphs

glsdown avatar Apr 19 '24 14:04 glsdown

Hi Gemma :wave:

This seems to be working as intended. If you click on the Regenerate Graph button it shows the figure.

In the callback it specifies starting with an empty graph.

 if not n:
        # generate empty graphs when app loads
        return {k: go.Figure(data=[]) for k in ["scatter", "hist_1", "hist_2"]}

AnnMarieW avatar Apr 19 '24 14:04 AnnMarieW

Yeah, this is as expected, but maybe we could write a clearer explanation somewhere as to what this is demonstrating (i.e. dynamically rendering graphs so they get sized correctly + preserving expensive to compute data across tabs when switching).

Also, we should totally wrap the graphs in a loading spinner rather than have the app just hang for a few seconds.

tcbegley avatar Apr 19 '24 15:04 tcbegley