Hi guys. Is there a means of applying a RangeSlider call back to the whole dataset after filtering , so that it affects all the graphs and other time series component of your dashboard rather than applying it to each single graph. I want to be able to apply the start and end month to my whole dashboard.
At a high level, you can have the range slider callback output your filtered data set to a hidden Div or dcc.Store. You can then have the callbacks that handle your graphs trigger on the change to this dataset.
Thanks for the correction @flyingcujo. That still is not the issue with the code. Cant get it to filter my dataframe on my graphs when i use the rangeSlider.
Hi @flyingcujo. I defined my df out of the app.layout, pivoted it to get the my pivots,defined all my traces for my graphs and then just called them within the app.layout. Should the call back for my dcc.Store be called first , or do i need to define and create all my pivots and traces within the app.layout??
I only have layout code in my layout.py file, just to keep it separate from my callbacks. As long as all your componts are defined prior to invoking app.server, it really doesn’t matter where you callbacks, layout, etc are located.
Per the FAQ:
All your callbacks must be defined before your Dash app’s server starts running, which is to say, before you call app.run_server(debug=True)
Regarding the calling order of your callbacks, it all depends on whether or not you have components “chained”, i.e. user pressing component 1 when then triggers callback A, whose outtput triggers callback B, etc.