I have been using plotly_chart graph_objects for drawing OHLC charts for stock tickers. I can draw a static chart using something like below:
Here is a section of my code:
import plotly.graph_objects as go fig = go.Figure() fig.add_trace(go.Candlestick(x=dataf[‘DateTime’], open=dataf[‘Open’], high=dataf[‘High’], low=dataf[‘Low’], close=dataf[‘Close’]) ) st.plotly_chart(fig)
This correctly draws my OHLC graph but I want it to refresh with each new data arriving every minute.
I understand streamlit add_rows can be used to auto refresh at a give interval. However I am not sure how I can use st.add_rows() in this situation, especially with plotly graph_objects.
Is graph_objects/plotly not supported by add_rows?