Graph Stuck on Crossfiltering

Hi,

I’m currently using cross-filtering to show a (“User Information”) histogram representing statistics of the hovered point. However, when hovering between datapoints really quickly, the histogram chart gets stuck.

Here’s the code:

# update histograms callback
@dash.callback(
    Output("today-graph", "figure"),
    Output("hover-user-col", "style"),
    Input("today-graph-picker", "value"),
    Input("toggle-yesterday", "checked"),
    Input("toggle-daily-forecast", "checked"),
    Input("data_refresh_signal", "data"),
    Input(ThemeChangerAIO.ids.radio("theme"), "value"),
)
def display_today_graph(value, yesterday, forecast, data_signal, theme):
    # load data
    data = db.get_df(r, "todays_sessions")

    if value == "today-aggregate-power":
        fivemindemand, daily_forecasts = db.get_multiple_df(r, ["fivemindemand", "dailyforecasts"])
        return pltf.PlotDaily.plot_daily_time_series(data, yesterday, fivemindemand, daily_forecasts, forecast, theme), {"display": "inline"}

    elif value == "today-energy-dist":
        return pltf.PlotDaily.plot_daily_energy_breakdown(data, theme), {"display": "none"}

I’m not really sure why, but I suspect that the line fivemindemand, daily_forecasts = db.get_multiple_df(r, ["fivemindemand", "dailyforecasts"])) is causing the callback to get stuck. This line reads data from Redis and it usually takes about 0.3 seconds. How does Dash handle returning from a callback early when the callback refires? Do you guys have any potential solutions to this issue?

Thank you!