How to clear and stop a callback?

i have wrote a dash python script to get live graph from a database. i just wont to ask, how to stop a callback by another callback?
i mean i have a button callback and i wand to stop the live graph callback by the button.

thanks in advance

Hello @alejandrosando,

Not being able to see your code, I am assuming that you are talking about an n_intervals for the live updates.

What you can do is have some sort of toggle on the button, and then in the live update call you pull the state of the button. If its off, the live updates give a raise PreventUpdate. If on, it just proceeds like normal.

If you provide an MRE I can show you what this would look like in your code.