DCC.LOADING (Spinners)

Hello DE’s, may I as has anyone faced a problem where dcc.Loading is not working. I want to load a spinner as the main graph takes some few secs to load.
Here is my implimentation:
dcc.Loading(type=‘circle’,color=‘#006400’,children=dcc.Graph(className=‘md-12’, figure=fig_funnel_vaccine(‘Asia’)))

Could you try to remove className in dcc.Graph? I think something as below should work:

dcc.Loading(children=[dcc.Graph(figure=fig_funnel_vaccine('Asia')], type='circle', color='#006400')


Hello, I have tried this solution but still it does not work. Is there any other way to implement this. Here is the actual code showing how I have implemented this?

1 Like

Just for debugging: supposing your figure gets created in a callback, you could increase the time for the figure generation using time.sleep( 3)

Does this show the spinner?

Sorry, it’s my fault. Can you try to remove className in your dcc.Graph?

1 Like

I will let you know once I try this as currently the figures are not being generated using callbacks. I am however writing some modifications on how the codes are being generated to try this.

Removing the className from dcc.Graph still doesn’t work. Let me try generating the graphs with callbacks and see what happens.