Click or drag to resize
ExcelChartCollectionAdd Method (ChartType, AnchorCell, AnchorCell)
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: 39.3.30.1189
Syntax
public ExcelChart Add(
	ChartType chartType,
	AnchorCell positionFrom,
	AnchorCell positionTo
)

Parameters

chartType
Type: GemBox.Spreadsheet.ChartsChartType
Type of the chart.
positionFrom
Type: GemBox.SpreadsheetAnchorCell
The chart's position (top-left corner).
positionTo
Type: GemBox.SpreadsheetAnchorCell
The chart's end position (bottom-right corner).

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