Summary
I want to update my echart with dynamically fetched data, but when I run below code, it adds a new chart to my page. Unlike t.text(markdown)
which doesn’t add but modifies existing text which is what I want my echarts to be like.
I am using python3.
Is there any argument or API to overwrite existing echarts instead of adding new?
Steps to reproduce
Code snippet:
t = st.empty()
if url:
while True:
time.sleep(1)
markdown, option = render(url)
t.text(markdown)
st_echarts(
option, width="450px", height="350px", key=str(datetime.datetime.now())
)
Expected behavior:
Modify existing echart without adding new
Actual behavior:
Keeps on adding new echarts in loop