InsertChart()

ShapeCollection::InsertChart(Charts::ChartType, float, float, float, float, int32_t) method

Creates a new chart, initializes it with sample series data and settings, and inserts it into the shape collection at the specified index.

System::SharedPtr<Charts::IChart> Aspose::Slides::ShapeCollection::InsertChart(Charts::ChartType type, float x, float y, float width, float height, int32_t index) override

Arguments

ParameterTypeDescription
typeCharts::ChartTypeThe type of chart to create.
xfloatThe x-coordinate of the new chart, in points.
yfloatThe y-coordinate of the new chart, in points.
widthfloatThe width of the new chart, in points.
heightfloatThe height of the new chart, in points.
indexint32_tThe zero-based index at which to insert the new chart in the shape collection.

Return Value

The newly created IChart.

ShapeCollection::InsertChart(Charts::ChartType, float, float, float, float, int32_t, bool) method

Creates a new chart, initializes it with sample series data and settings, and inserts it into the shape collection at the specified index.

System::SharedPtr<Charts::IChart> Aspose::Slides::ShapeCollection::InsertChart(Charts::ChartType type, float x, float y, float width, float height, int32_t index, bool initWithSample) override

Arguments

ParameterTypeDescription
typeCharts::ChartTypeThe type of chart to create.
xfloatThe x-coordinate of the new chart, in points.
yfloatThe y-coordinate of the new chart, in points.
widthfloatThe width of the new chart, in points.
heightfloatThe height of the new chart, in points.
indexint32_tThe zero-based index at which to insert the new chart in the shape collection.
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 IChart.

See Also