Black Lives Matter. Please consider donating to Black Girls Code today.

Update Slow Graph on Button Click?

Hi all,

Is it possible to update a graph only when a button is clicked. I’ve looked into the State object a little but seems to be only for html.Div I think from my brief overlook

Does anyone have any suggestions on how to implement this type of feature?

State is exactly what you need. You use State whenever you need to use the value of a prop in a callback, but you don’t want a change in the value of that prop to trigger the callback (which is the case for anything you use as an Input).

1 Like

Thank you! this worked for me perfectly after I looked into it a bit more