How to erase a chart from one callback and update it from another?

I have a simulator in Dash. As the user clicks a button, it updates a chart. But when the sim is done, the chart needs to be cleared/erased/hidden while the user sets up with new initial conditions for a new run. Error: the same output cannot appear in two callbacks. Any suggestions?

Hi,

Welcome to the community! :slight_smile:

The error is just pointing out that you can’t have two callbacks updating the same figure, so you must combine the two callbacks into one. If you could share the code, it might be easier to give a concrete suggestion on how to combine them…

In general terms, it is usually required to use the callback context to decide which type of update is needed:

1 Like

You might want to try out the multiplexer transform,

1 Like