✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Graph resizes (arbitrarily) when changing between Tabs in a Dash App

I have build a simple app with two Tabs (using the 2nd method from here https://dash.plotly.com/dash-core-components/tabs). The first Tab has a heatmap and a graph, the second tab has some buttons.

When I launch the App, the content of Tab 1 renders fine and as long as I stay in Tab 1, no problem.
When I change to Tab 2, all good there.

But when I change back to Tab 1, the graph is now differently scaled and the only way to get the correct layout back is to reload the page with the Browser’s reload button

. I have attached two screenshots.

I am working on a Mac and it happens on FireFox and Safari. I have the latest version Dash installed (1.12.0).

Does this ring any bells with any one?

Thanks a lot for any help and insights.

OK, I solved this. It turns out that “autosize = False” in the go.Layout was causing this. Without autosize, all works fine!