Publish-subscribe pattern in Dash

I am working on a multi-page Dash application and each page displays a different chart from a common data set. The user is able to change the range of dates of the data set. I need to allow the user to change the range of dates and then re-plot the figures in each page.

I have date pickers on a navigation bar. I want to notify the pages in the application that the charts need to be refreshed using the new data set.

Is there recommended way to implement this kind of pub-sub pattern in Dash?

I’ve seen interval and live updates, but those don’t fit my needs. I don’t want to re-plot the charts every time a page is loaded, but only when the data set has changed.

I’ve thought about caching the current layout for each page in session Storage and, on each page load, check if the dates have changed since the last page load. However, this caching of layouts would be recreating some of the core functionality of Dash.

Is there a recommended pattern for this kind of functionality?


Can you add a multiple output callback attached to the date picker component?

I think that will do it. That’s a simple solution.
Thanks for the suggestion.