add_shape_in_chart方法

add_shape_in_chart(type, placement, left, top, right, bottom)

添加图形到图表。所有单位是图表面积的 1/4000。

def add_shape_in_chart(self, type, placement, left, top, right, bottom):
    ...
范围类型描述
typeMsoDrawingType绘图类型。
placementPlacementType展示位置类型。
leftint以 1/4000 图表区域宽度为单位。
topint以 1/4000 图表区域高度为单位。
rightint以 1/4000 图表区域宽度为单位。
bottomint以 1/4000 图表区域高度为单位。

add_shape_in_chart(type, placement, left, top, right, bottom, image_data)

添加图形到图表。所有单位是图表面积的 1/4000。

def add_shape_in_chart(self, type, placement, left, top, right, bottom, image_data):
    ...
范围类型描述
typeMsoDrawingType绘图类型。
placementPlacementType展示位置类型。
leftint以 1/4000 图表区域宽度为单位。
topint以 1/4000 图表区域高度为单位。
rightint以 1/4000 图表区域宽度为单位。
bottomint以 1/4000 图表区域高度为单位。
image_databytes如果形状不是图片或 ole 对象,imageData 应该为空。

也可以看看