python-pyecharts绘制漏斗图
from pyecharts.charts import Funnel
from pyecharts import options as opts
# 数据
data = [("访问", 100), ("咨询", 80), ("订单", 60), ("点击", 40), ("展现", 20)]
# 创建漏斗图
funnel = (
Funnel()
.add("漏斗图", data)
.set_global_opts(title_opts=opts.TitleOpts(title="漏斗图示例"))
)
# 渲染图表
funnel.render("funnel.html")