[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IShapes.AddChart

AddChart Method

AddChart(ChartType, double, double, double, double)

Creates a chart at the specified location on the active sheet.

Declaration
IShape AddChart(ChartType chartType, double left, double top, double width, double height)
Function AddChart(chartType As ChartType, left As Double, top As Double, width As Double, height As Double) As IShape
Parameters
Type Name Description
ChartType chartType

The chart type.

double left

The distance, in points, from the left edge of the object to the left edge of column A (on a worksheet) or the left edge of the chart area (on a chart).

double top

The distance, in points, from the top edge of the top most shape in the shape range to the top edge of the worksheet.

double width

The width, in points, of the object.

double height

The height, in points, of the object.

Returns
Type Description
IShape

The IShapeThe object.

AddChart(ChartType, IRange)

Creates a chart at the specified range on the current sheet.
The sheet of targetRange and the sheet of the shape being added must be the same sheet.

Declaration
IShape AddChart(ChartType chartType, IRange targetRange)
Function AddChart(chartType As ChartType, targetRange As IRange) As IShape
Parameters
Type Name Description
ChartType chartType

The chart type.

IRange targetRange

The target range of the current sheet.

Returns
Type Description
IShape

The IShapeThe object.

AddChart(string, ChartType, double, double, double, double)

Creates a chart at the specified location on the active sheet.

Declaration
IShape AddChart(string name, ChartType chartType, double left, double top, double width, double height)
Function AddChart(name As String, chartType As ChartType, left As Double, top As Double, width As Double, height As Double) As IShape
Parameters
Type Name Description
string name

The chart name.

ChartType chartType

The chart type.

double left

The distance, in points, from the left edge of the object to the left edge of column A (on a worksheet) or the left edge of the chart area (on a chart).

double top

The distance, in points, from the top edge of the top most shape in the shape range to the top edge of the worksheet.

double width

The width, in points, of the object.

double height

The height, in points, of the object.

Returns
Type Description
IShape

The IShapeThe object.

AddChart(string, ChartType, IRange)

Creates a chart at the specified range on the current sheet.
The sheet of targetRange and the sheet of the shape being added must be the same sheet.

Declaration
IShape AddChart(string name, ChartType chartType, IRange targetRange)
Function AddChart(name As String, chartType As ChartType, targetRange As IRange) As IShape
Parameters
Type Name Description
string name

The chart name.

ChartType chartType

The chart type.

IRange targetRange

The target range of the current sheet.

Returns
Type Description
IShape

The IShapeThe object.