✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Updating Pie Chart On The Click Of A Button

I am trying to create a button in Dash which allows me to update the values of a pie graph or maybe even multiple pie graphs. Is it possible to have some data that updates the chart on the click of a button?

Hi @as11,

Welcome to the forum!

Yes indeed, you can. AFAIK there are two ways you can do this:

I hope this helps. :slight_smile:

1 Like

Thank you for the response @suiroc,

I looked at some of the examples although they were pretty helpful in understanding the concepts of Dash, it does not help that well with what I am trying to do. I have a singular button on the page which I would like to use to refresh the pie chart with new data every time it is clicked. Most of the examples show it with multiple buttons and using the change of pages to show new graphs and that is not what I am looking for. I am a beginner and would appreciate any further help