Callback origin and reset clickdata on Python Dash

I had set a callback that receives the value of a dropdown and a clickdata on a graph. If dropdown value changes, the graph was recolored and table values were updated. If I click on the graph, the same thing happens with the colors and the table Data. But there’s this situation: When I already clicked on the graph the clickdata haven’t been cleaned. So, how can I know the origin of the callback or how can i clean the clickdata on the end of the current callback?


Checkout dash.callback_context.triggered >> Q: How do I determine which Input has changed?

I think this needs to be moved to a more prominent position in the docs. I’ve been using Dash for over a year and didn’t know about this!

1 Like

You’re absolutely right ->
We’ll get to it eventually, but if anyone is motivated to contribute, this would be a great one to take on :slight_smile:

Thank you, it works!

Now dash.callback_context has been documented with an nice example at