Click or drag to resize
ExcelChartCollectionAdd Method (ChartType, Double, Double, Double, Double, LengthUnit)
Adds a new chart to the worksheet which doesn't move nor 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,
	double left,
	double top,
	double width,
	double height,
	LengthUnit unit
)

Parameters

chartType
Type: GemBox.Spreadsheet.ChartsChartType
Type of the chart.
left
Type: SystemDouble
The distance of the left edge of the chart from the left edge of the worksheet.
top
Type: SystemDouble
The distance of the top edge of the chart from the top edge of the worksheet.
width
Type: SystemDouble
The chart's width.
height
Type: SystemDouble
The chart's height.
unit
Type: GemBox.SpreadsheetLengthUnit
The length unit in which all length parameters are specified.

Return Value

Type: ExcelChart
A new chart added to the worksheet which doesn't move nor sizes with cells.
Remarks
Position.Mode of a newly added chart will be FreeFloating.
See Also