add_shape_in_chart方法

add_shape_in_chart(self, 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(self, 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 应该为空。

也可以看看