Problems on Pyecharts

Hi All
I am currently working on visualize data on map by using pyecharts, here is my code

from pyecharts.charts import Map
from pyecharts import options as opts

map = Map()
map.add("", [list(z) for z in zip(test.province_name, test.values)], "china")
map.set_global_opts(
    title_opts=opts.TitleOpts(title="ATA",
                              subtitle="Data Source:Cube",
                              pos_right="center",
                              pos_top="5%"),
    visualmap_opts=opts.VisualMapOpts(max_=test.values.max(),
                                      min_=test.values.min(),
                                      split_number=5,
                                      is_piecewise=True,
                                      is_inverse=True,
                                      range_color=['green', 'orange']),
)
map = map.render_embed()

after this I was trying to use

from streamlit_echarts import st_pyecharts
st_pyecharts(map)

but nothing is showing on the APP, then I tried to use

import streamlit.components.v1 as components
components.html(map)

it only shows partial of the graph, no idea why…


From time to time, sometimes the map shows well and sometimes not…
Has anyone encountered similar question before? Please Help :joy:

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