Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 591 Bytes

bar_yaxis_formatter.md

File metadata and controls

24 lines (18 loc) · 591 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())
    .add_yaxis("商家B", Faker.values())
    .set_global_opts(
        title_opts=opts.TitleOpts(title="Bar-Y 轴 formatter"),
        yaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(formatter="{value} /月")),
    )
    .render("bar_yaxis_formatter.html")
)
<iframe width="100%" height="800px" src="Bar/bar_yaxis_formatter.html"></iframe>