from pyecharts import options as opts
from pyecharts.charts import Polar
from pyecharts.faker import Faker
c =(
Polar().add_schema(
radiusaxis_opts=opts.RadiusAxisOpts(data=Faker.week, type_="category"),
angleaxis_opts=opts.AngleAxisOpts(is_clockwise=True, max_=10),).add("A",[1,2,3,4,3,5,1], type_="bar").set_global_opts(title_opts=opts.TitleOpts(title="Polar-RadiusAxis")).set_series_opts(label_opts=opts.LabelOpts(is_show=True)).render("polar_radius.html"))
极坐标图-散点型
import random
from pyecharts import options as opts
from pyecharts.charts import Polar
data =[(i, random.randint(1,100))for i inrange(101)]
c =(
Polar().add("", data, type_="scatter", label_opts=opts.LabelOpts(is_show=False)).set_global_opts(title_opts=opts.TitleOpts(title="Polar-Scatter0")).render("polar_scatter_0.html"))
极坐标图-角度
from pyecharts import options as opts
from pyecharts.charts import Polar
from pyecharts.faker import Faker
c =(
Polar().add_schema(angleaxis_opts=opts.AngleAxisOpts(data=Faker.week, type_="category")).add("A",[1,2,3,4,3,5,1], type_="bar", stack="stack0").add("B",[2,4,6,1,2,3,1], type_="bar", stack="stack0").add("C",[1,2,3,4,1,2,5], type_="bar", stack="stack0").set_global_opts(title_opts=opts.TitleOpts(title="Polar-AngleAxis")).render("polar_angleaxis.html"))
极坐标图-动态散点图
import random
from pyecharts import options as opts
from pyecharts.charts import Polar
data =[(i, random.randint(1,100))for i inrange(10)]
c =(
Polar().add("",
data,
type_="effectScatter",
effect_opts=opts.EffectOpts(scale=10, period=5),
label_opts=opts.LabelOpts(is_show=False),).set_global_opts(title_opts=opts.TitleOpts(title="Polar-EffectScatter")).render("polar_effectscatter.html"))
2、漏斗图
from pyecharts import options as opts
from pyecharts.charts import Funnel
from pyecharts.faker import Faker
c =(
Funnel().add("商品",[list(z)for z inzip(Faker.choose(), Faker.values())],
sort_="ascending",
label_opts=opts.LabelOpts(position="inside"),).set_global_opts(title_opts=opts.TitleOpts(title="Funnel-Sort(ascending)")).render("funnel_sort_ascending.html"))
2、漏斗图-1
from pyecharts import options as opts
from pyecharts.charts import Funnel
from pyecharts.faker import Faker
c =(
Funnel().add("商品",[list(z)for z inzip(Faker.choose(), Faker.values())]).set_global_opts(title_opts=opts.TitleOpts(title="Funnel-基本示例")).render("funnel_base.html"))