AddChart()

IShapeCollection::AddChart(Charts::ChartType, float, float, float, float) method

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

virtual System::SharedPtr<Charts::IChart> Aspose::Slides::IShapeCollection::AddChart(Charts::ChartType type, float x, float y, float width, float height)=0

Arguments

ParameterTypeDescription
typeCharts::ChartTypeThe 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.

Return Value

The newly created Charts::IChart.

IShapeCollection::AddChart(Charts::ChartType, float, float, float, float, bool) method

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

virtual System::SharedPtr<Charts::IChart> Aspose::Slides::IShapeCollection::AddChart(Charts::ChartType type, float x, float y, float width, float height, bool initWithSample)=0

Arguments

ParameterTypeDescription
typeCharts::ChartTypeThe 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.
initWithSampleboolTrue 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.

Return Value

The newly created Charts::IChart.

See Also