add_chart method
Contents
[
Hide
]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):
...
| Parameter | Type | Description |
|---|---|---|
| type | ChartType | The type of chart to add. |
| x | float | The x-coordinate of the new chart, in points. |
| y | float | The y-coordinate of the new chart, in points. |
| width | float | The width of the chart, in points. |
| height | float | The height of the chart, in points. |
Examples
The following example shows how to create Chart in PowerPoint Presentation.
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):
...
| Parameter | Type | Description |
|---|---|---|
| type | ChartType | The type of chart to add. |
| x | float | The x-coordinate of the new chart, in points. |
| y | float | The y-coordinate of the new chart, in points. |
| width | float | The width of the chart, in points. |
| height | float | The height of the chart, in points. |
| init_with_sample | bool | True 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
- enumeration
ChartType - class
IChart - class
ShapeCollection - module
aspose.slides - library
Aspose.Slides