add_chart method

add_chart

Creates a new chart, initializes it with sample series data and settings, and adds it to the end of the shape collection.

Returns

The newly created IChart.

def add_chart(self, type, x, y, width, height):
    ...
ParameterTypeDescription
typeChartTypeThe type of chart to add.
xfloatThe x-coordinate of the new chart, in points.
yfloatThe y-coordinate of the new chart, in points.
widthfloatThe width of the chart, in points.
heightfloatThe height of the chart, in points.

add_chart

Creates a new chart, initializes it with sample series data and settings, and adds it to the end of the shape collection.

Returns

The newly created IChart.

def add_chart(self, type, x, y, width, height, init_with_sample):
    ...
ParameterTypeDescription
typeChartTypeThe type of chart to add.
xfloatThe x-coordinate of the new chart, in points.
yfloatThe y-coordinate of the new chart, in points.
widthfloatThe width of the chart, in points.
heightfloatThe height of the chart, in points.
init_with_sampleboolTrue to initialize the new chart with sample series data and settings;

false to create the chart with no series and only minimal settings, which makes creation faster.

See Also