I was initially trying out
st.line_chart & it works well with reloading of chart using the
add_rows function, when new data is appended.
chart = st.line_chart(df, height=250) chart.add_rows(df2)
However, the downside is that this matplotlib plotting does not provide much room to tweak the chart, e.g. fixing axis limits, naming axis titles. So I decided to try altair instead.
Altair has much more options to tweak the chart by customising the figure before loading into
st.altair_chart, but the problem comes about when I want the chart to reload whenever new data is appending. I cant just
So the question is, how can I reload altair charts when new data is added to the dataframe?