InsertChart()

IShapeCollection::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.

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

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 Charts::IChart.

IShapeCollection::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.

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

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 Charts::IChart.

See Also