pyecharts/example/map_globe_example.py
jaska 9216aa7c7d 3d map (#1213)
*  globe in 3d

* 💚 test map3d and map globe

* 💄 update import list

* 📚 add render examples

* 💄 update coding style

* Format: code
2019-06-27 12:47:15 +08:00

29 lines
710 B
Python

import pyecharts.options as opts
from example.commons import POPULATION
from pyecharts.charts import MapGlobe
high = max([x for _, x in POPULATION[1:]])
low = min([x for _, x in POPULATION[1:]])
m = (
MapGlobe()
.add_schema()
.add(
maptype="world",
series_name="World Population",
data_pair=POPULATION[1:],
is_map_symbol_show=False,
label_opts=opts.LabelOpts(is_show=False),
)
.set_global_opts(
visualmap_opts=opts.VisualMapOpts(
min_=low,
max_=high,
range_text=["max", "min"],
is_calculable=True,
range_color=["lightskyblue", "yellow", "orangered"],
)
)
)
m.render()