Click or drag to resize
ExcelChartCollectionAdd Method (ChartType, ChartGrouping, String, String)
Adds a new chart to the worksheet which moves and sizes with cells.

Namespace: GemBox.Spreadsheet.Charts
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1000
Syntax
public ExcelChart Add(
	ChartType chartType,
	ChartGrouping chartGrouping,
	string positionFromCell,
	string positionToCell
)

Parameters

chartType
Type: GemBox.Spreadsheet.ChartsChartType
Type of the chart.
chartGrouping
Type: GemBox.Spreadsheet.ChartsChartGrouping
The chart's series grouping (clustered, stacked or 100% stacked).
positionFromCell
Type: SystemString
The chart's position (top-left corner) (for example, "A1").
positionToCell
Type: SystemString
The chart's end position (bottom-right corner) (for example, "B2").

Return Value

Type: ExcelChart
A new chart added to the worksheet which moves and sizes with cells.
Remarks
Position.Mode of a newly added chart will be MoveAndSize.
See Also