Home >
other > Pyecharts geo encounter a bug, a great god for help to see where the problem
Pyecharts geo encounter a bug, a great god for help to see where the problem
Pyecharts geo geographic map function
# to add two illustrations, a color, the current calling a possession. The add (), add one more color said other markets, invoke two. The add (), but set of color why are switched?
The from pyecharts import options as opts
The from pyecharts. Charts import Geo
The from pyecharts. Globals import ThemeType
The from pyecharts. Globals import ChartType, SymbolType
C=(
Geo (init_opts=opts. InitOpts (width="1500 px", height="800 px", bg_color="# FFFAFA", the theme=ThemeType. WHITE))
Add_schema (
Maptype="China",
Itemstyle_opts=opts. ItemStyleOpts (color="# E1FFFF border_color=" # 000080 ", border_width=1),
)
. Add (
"Possession",
[(" guangzhou ", 55), (" Beijing ", 66)],
Type_=ChartType EFFECT_SCATTER,
Color="# 696969", # show grey marker
)
. Add (
"Other,"
[(" Qingdao ", 0), (" chengdu ", 0), (" xining, 0)],
Type_=ChartType EFFECT_SCATTER,
Color="# FF0000", # red marker there are bugs, and the color of the above the
)
Set_series_opts (label_opts=opts. LabelOpts (is_show=False))
Set_global_opts (title_opts=opts. TitleOpts (title="Geo - Lines - background"))
Render (" geo_lines_background. HTML ")
)