✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

dcc.Intervals and "POST /_dash-update-component" when setting animation

Hi Guys,

I’m working on a project with an animated chart where I’m using Dash instead of plotly, to animate it;

The chart:

The problem is that every time that Interval run it do a:
[06/Jul/2020 21:26:03] "POST /_dash-update-component HTTP/1.1" 200 -

For each Interval value it runs two POST requisitions:

Is it correct? how can I avoid it trigger the POST requisition to the server?

THE APPLICATION CODE:
I’m using an Interval that updates my slider
image

And the slider updated value will be used to plot the correct frame of the figure animation

And the layout where I’m rendering the chart:

I would be very grateful if someone can help me doing this task;

This is the request to the backend for a callback. Each POST = 1 call to the callback.

Do you happen to have multiple tabs open? If multiple windows are open (or multiple people are viewing), then each window will make make it’s own requests to the callback.

Hey Chris, thank you for your answer…

So, getting the new value of Slider and the new figure to render on the animation is considered a request to the backend? Every time that the interval runs in a callback I will necessarily see a POST request?

Yes. A POST request is how data makes it’s way from your browser into your Python app.callback functions (and back up to the web browser).

1 Like