数据可视化pyecharts
官方文档
init_opts常用配置
设置长宽
c=Map(init_opts=opts.InitOpts(width=wid,height=hei))
c.set_global_opts常用属性
设置标题
title_opts=opts.TitleOpts(title=a+"XXX")
设置x轴标签全部显示
c.set_global_opts(xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(font_size=10,interval=0)))
将图例立起来
c.set_global_opts(
title_opts=opts.TitleOpts(title=""),
datazoom_opts=opts.DataZoomOpts(),
legend_opts=opts.LegendOpts(
type_="scroll", pos_left="80%", orient="vertical"
)
)
图例设置为只能单选
legend_opts=opts.LegendOpts(selected_mode='single'),
设置x轴可拉动
datazoom_opts=opts.DataZoomOpts()