I try to create an animated bar chart. Each timestep represents the values for different provinces for a given date. Therefore the classic approach with add_row() does not work, I need to exchange the entire dataset for each timestep. I tried this, but the plot stays unchanged. I was wondering if there is a way of deleting all rows before adding the new data frame using add_row(). Thanks for any suggestions.
chart = get_bar_chart(data_filtered, plot_title, ax_title, marker_col)
st.altair_chart(chart)
progress_timestep_inc = int(1 / len(DATE_LIST) * 100)
progress_timestep = 0
for dt in dates:
data_filtered = data[data['date'] == dt]
chart.data = data_filtered
if dt == DATE_LIST[-1] or progress_timestep > 100:
progress_timestep = 100
progress_bar.progress(progress_timestep)
progress_timestep += progress_timestep_inc
time.sleep(0.2)