Can I have an optional output?

I have two callbacks. One updates the scale of the y axis by taking in the relayout object and then outputing a figure and the second fires based on an interval component timer and outputs and extenddata object.

This is the logic I want to achieve:

  • If the zoom was updated, then send back just the figure with the updated y axis
  • If the interval component fired, then send back both the extenddata object and the figure with the updated y axis

I know it’s possible to have multiple outputs in a single callback, but I was wondering if it’s possible to only fill one of the callbacks some of the time. If not, is there another way for me to achieve this logic using callbacks?

1 Like

Hello @ibenok,

Yes, you can perform optional callbacks by using dash.no_update to return no update to which element isnt supposed to get updated. :slight_smile:

Is this in the docs? I’m having a hard time finding it

Found it thanks

1 Like