Dash - plotly.offline equivilant? Assuming no callbacks

Hi there,

One of my favorite features of Plotly is the offline capability.

I have a large Dash app with 8 plots coming off of 1 input/callback. I’d like to convert this from dynamic to static. Why you might ask? Lots of reasons (I want a file of the whole page of plots that I can email out, I want to remove the complexity in my code so I can test/iterate quicker, and other reason).

So, I’m taking the code, removing the callbacks, removing the Dash app lines and replacing with the plotly code (ex. py.plot(fig, filename=‘file.html’).

However, is there a better way? Could I take the output of Dash (which I think is HTML Div components?) and pass those to dash_renderer somehow?

Example of what would be cool to put at the end of my code to do this:
app.run_server(debug=True, offline=True, filename=‘file.html’)

This feature (or a documented workaround) would be useful for simple Dash apps with no callback like the examples on this page.

Cheers and great work to the Plotly team - huge fan of what you all do!

2 Likes