I have dashboard which pulls budget data from a function which randomizes monthly expenses and income into a dataframe, and I then visualize that data in various graphs via dash layout.
The dash has a button that I would like to ‘re-generate’ this data, so the graphs would then visualize the newly randomly generated data (basically just re-run the functions again). However I am unsure on how to do this.
Essentially, you’ll define a callback with your button’s click being the input and the charts/graphs you want to redraw as the Output. For the callback to work, you’ll wire it up to a function that will simply repopulate the same dataframe you originally used when the application starts. The return value of the function will be the set of charts you would redraw. The link above has code examples that’ll guide you towards your solution.