pyecharts x轴

x轴显示文字被省略显示

bar.set_global_opts(
    xaxis_opts=opts.AxisOpts(axislabel_opts={
        "interval": "0", # 全部显示
        "rotate": "-30"}), # 加个角度
)

x轴的文字虽然倾斜了但是还是显示不全

grid = Grid(init_opts=opts.InitOpts(
        width='1800px',
        height='1000px',
    ))
grid.add(bar, grid_opts=opts.GridOpts(pos_bottom='30%', is_contain_label=True))
grid.render()
posted @ 2021-12-20 13:23  兔子春  阅读(606)  评论(0)    收藏  举报