Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 565 Bytes

bar_reversal_axis.md

File metadata and controls

22 lines (17 loc) · 565 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())
    .reversal_axis()
    .set_series_opts(label_opts=opts.LabelOpts(position="right"))
    .set_global_opts(title_opts=opts.TitleOpts(title="Bar-翻转 XY 轴"))
    .render("bar_reversal_axis.html")
)
<iframe width="100%" height="800px" src="Bar/bar_reversal_axis.html"></iframe>