I have a dashboard with several dcc.Graph components. Due to the size of the dataframe on which the graphs are built, the graphs can take 10+ seconds to load. This can be confusing for a user that selects a dropdown, but sees no change in the graph initially. Which leads me to my question:
Is there a way to use the dcc.Loading component to present a loading message/icon when graphs are loading?
Put the graph in the Loading component’s children list and it will show a loading animation for as long as the callback runs. It automatically detects any callback with one of it’s children as output.
I have a callback with multiple outputs (“fig”,“children”) and I would like to apply the dcc.Loading only to the loading graph. So I am doing what is suggested here. However, my app is running updating the graph without the loading animation.
Now, if I change the callback to have only one output (“fig”), then the app is working properly including the loading animation as expected.