要拉长Excel中饼图的长度,可以通过修改以下代码中的'layout'部分来实现:

chart.set_legend({
    'layout': {
        'x': 0.70,
        'y': 0.01,
        'width': 0.30,
        'height': 0.99,
    }
})

可以尝试修改'width'的值来改变饼图的长度,增大值会拉长饼图的长度,减小值会缩短饼图的长度。具体的数值可以根据需要进行调整。

def get_pie_chartself table_cell data_table chart data_linechart points_color = fill color Chart_Colorx for x in xrangelendata_tablegetdata20 for index cols in enumerateselflinechart_col

原文地址: https://www.cveoy.top/t/topic/iZ2H 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录