数据可视化 - 柱状图堆叠效果_数据


from pyecharts import options as opts
from pyecharts.charts import Bar
from pyecharts.faker import Faker

c = (
Bar()
.add_xaxis(Faker.choose())
.add_yaxis("商家A", Faker.values(), stack="stack1")
.add_yaxis("商家B", Faker.values(), stack="stack1")
.set_series_opts(label_opts=opts.LabelOpts(is_show=False))
.set_global_opts(title_opts=opts.TitleOpts(title="Bar-堆叠数据(全部)"))
.render("bar_stack0.html")
)