How can I make another query request once I run a plotly python script?

Hi plotly members,

I would like to ask you guys a quick question regarding “query request”.

Once I execute the query below, how can I make another query request? like using buttons to update the query something like that…
c.execute("SELECT major, count(major) from marathon group by major")
For example, I want my chart can be updated when clicking button to run other query request.

Please advise! Your help would be very appreciated!

Hi @TreyYi,

See answer at Plotly Buttons with Dependent Interactions. Basically you’ll need move to FigureWidget or Dash in order to be able to execute Python code in response to plot interactions.

Hope that helps!