Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 570 Bytes

bar_stack0.md

File metadata and controls

21 lines (16 loc) · 570 Bytes

pyecharts 代码 / 效果

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")
)
<iframe width="100%" height="800px" src="Bar/bar_stack0.html"></iframe>