-
I created a simple page with a pyplot.express plot and a button. class IMM_GUI_PAGE(rio.Component):
|
Beta Was this translation helpful? Give feedback.
Answered by
Aran-Fey
Oct 21, 2024
Replies: 1 comment 1 reply
-
Rio components only update automatically if you assign a new value to one of the component's attributes. There's no way for Rio to know that you've changed the data in your dataframe, so you must explicitly tell it to rebuild your component by calling async def update_plotly_fig(self):
self.data['y'] = np.random.randint(0,4,4)
await self.force_refresh() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Nachsh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rio components only update automatically if you assign a new value to one of the component's attributes. There's no way for Rio to know that you've changed the data in your dataframe, so you must explicitly tell it to rebuild your component by calling
self.force_refresh()
: