數據可視化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()