Click or drag to resize
ExcelChartCollectionAddT Method (ChartGrouping, 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: 41.3.30.1032
Syntax
public T Add<T>(
	ChartGrouping chartGrouping,
	AnchorCell positionFrom,
	AnchorCell positionTo
)
where T : ExcelChart

Parameters

chartGrouping
Type: GemBox.Spreadsheet.ChartsChartGrouping
The chart's series grouping (clustered, stacked or 100% stacked).
positionFrom
Type: GemBox.SpreadsheetAnchorCell
The chart's position (top-left corner).
positionTo
Type: GemBox.SpreadsheetAnchorCell
The chart's end position (bottom-right corner).

Type Parameters

T
The type of the chart deriving from ExcelChart type.

Return Value

Type: T
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