On Clicking Button how to refresh the page in Dash

Hi,

I am building a dash dashboard for sentiment analysis and I have a pie chart and a data-table, the data-table updates when i click the different sentiments in the pie chart. But, I also want the data-table to go back to the original state (showing all the data) when i click on a Button. How do I achieve this?

Is this possible in Dash? and how can I achieve this?

Regards
Aiswarya

It is possible but you need to provide this functionality. In your callback(s) that handle layout updates (for pie chart, table, etc), you need to check to see whether or not your “reset button” was clicked. You can do this check at the start of your callback - look into dash.callback_context in the Dash FAQs. If you detect the reset button, output accordingly.