Delay callback of x-axis range sliders for time series graph

Hi guys, I’m working on the financial application including a lot of time series data. I’ve figured out the dcc.Loading component always pop up immediately after an user moved the slider.

Is there any method to delay any callback in Dash?

Feel free to discuss, thanks all!

Here is the sample callback function:

@app.callback(
    Output('graph', 'figure'),
    Input('graph', 'relayoutData'),
    State('graph', 'figure'),
    prevent_initial_call=True,
)
def xxx(relayoutData, figure):
    # ...
    return figure

Hi @tradingview05814 welcome to the forums.

Assuming you are using the dcc.Slider(), you can choose between two options concerning the updating, take a look at the updatemode property.

Other than that, you really want to slow down your app manually?

Thanks @AIMPED

I’m using this range slider for the charts.

The mouseup updatemode from dcc.Slider() is what I eventually want, do you know how does it work in the range-slider?