dragov 发表于 2020-4-2 08:28:27

Pyecharts 的 疑 惑 ---- C

from pyecharts import options as opts
from pyecharts.charts import Bar
a=["宁河区", "宝坻区", "蓟州区", "武清区", "静海区", "滨海新区"]
g=
y=
gyl = (
   Bar()
   .add_xaxis(a)
   .add_yaxis("商家数量A",g,stack="stack9")
   .add_yaxis("商家数量B",y,stack="stack9")
   .set_series_opts(label_opts=opts.LabelOpts(is_show=True))
   .set_global_opts(title_opts=opts.TitleOpts(title="天津市外围区域统计"))
   .render("gyl-15.html")
)

[*]程序代码中的 y轴 : stack="stack9",两句都写一样就叠加,好似写什么字母都可以,是这样的吧 ?{:7_130:}
[*] 有什么意义呢 ?{:7_117:}

BngThea 发表于 2020-4-2 08:34:50

只要是同名的就堆叠
可以设置不同名的
页: [1]
查看完整版本: Pyecharts 的 疑 惑 ---- C