Modify Streamlit echarts inside loop without adding new chart


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:
            markdown, option = render(url)
                option, width="450px", height="350px", key=str(

Expected behavior:

Modify existing echart without adding new

Actual behavior:

Keeps on adding new echarts in loop

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.