Pyecharts饼图位置设置
发布时间
阅读量:
阅读量
在将 pyecharts 中的饼图集成至其他网页时,有时需要对饼图的位置进行适当调整。若未进行相应处理,可能出现如下显示效果:

调整后所产生的成效如下:

核心代码部分体现为:
center=["40%", "60%"]
def pie_base_proc(p_dict, p_list) -> Pie:
c = (
Pie(init_opts=opts.InitOpts(width=p_dict['width'],height=p_dict['height']))
.add("", p_list,center=["40%", "60%"])
.set_global_opts(title_opts=opts.TitleOpts(title=p_dict['t
全部评论 (0)
还没有任何评论哟~
