Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 629 Bytes

146.md

File metadata and controls

26 lines (22 loc) · 629 Bytes
@author jackzhenguo
@desc
@tag
@version 
@date 2020/02/13
from pyecharts import options as opts
from pyecharts.charts import Funnel, Page
from random import randint

def funnel_base() -> Funnel:
  c = (
    Funnel()
    .add("豪车", [list(z) for z in zip(['宝马', '法拉利', '奔驰', '奥迪', '大众', '丰田', '特斯拉'],
                 [randint(1, 20) for _ in range(7)])])
    .set_global_opts(title_opts=opts.TitleOpts(title="豪车漏斗图"))
  )
  return c
funnel_base().render('./img/car_fnnel.html')  
[上一个例子](145.md) [下一个例子](147.md)