Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 632 Bytes

geo_visualmap_piecewise.md

File metadata and controls

23 lines (18 loc) · 632 Bytes

pyecharts 代码 / 效果

from pyecharts import options as opts
from pyecharts.charts import Geo
from pyecharts.faker import Faker

c = (
    Geo()
    .add_schema(maptype="china")
    .add("geo", [list(z) for z in zip(Faker.provinces, Faker.values())])
    .set_series_opts(label_opts=opts.LabelOpts(is_show=False))
    .set_global_opts(
        visualmap_opts=opts.VisualMapOpts(is_piecewise=True),
        title_opts=opts.TitleOpts(title="Geo-VisualMap(分段型)"),
    )
    .render("geo_visualmap_piecewise.html")
)
<iframe width="100%" height="800px" src="Geo/geo_visualmap_piecewise.html"></iframe>