streamlit-echarts
streamlit-echarts copied to clipboard
pyecharts saveAsImage toolbox not work
I add a saveAsImage button to pyecharts, which works in HTML render but not works in streamlit-pyecharts
Hi @Dulou ! Do you have a code snippet I can reuse to test on my side? Thanks again! Fanilo
Sorry to reply late.
I just use the pyecharts example in the readme
from pyecharts import options as opts
from pyecharts.charts import Bar
from streamlit_echarts import st_pyecharts
b = (
Bar()
.add_xaxis(["Microsoft", "Amazon", "IBM", "Oracle", "Google", "Alibaba"])
.add_yaxis(
"2017-2018 Revenue in (billion $)", [21.2, 20.4, 10.3, 6.08, 4, 2.2]
)
.set_global_opts(
title_opts=opts.TitleOpts(
title="Top cloud providers 2018", subtitle="2017-2018 Revenue"
),
toolbox_opts=opts.ToolboxOpts(),
)
)
st_pyecharts(b)
After I use the saveAsImage button, the toolbox will disappear and no image is saved as below
More information: Edge Brower ( Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 Edg/98.0.1108.55 )
@andfanilo - i can confirm this issue. toolbox disappears when save image is selected. Does this have to do anything with streamlit security?
pyecharts when rendered in jupyter using render_notebook()
, the save image option of toolbar works. So this issue is specific to not related to pyecharts
Note: All other options of toolbox are working well without an issue except save image
+1