Shapes.AddChart Method

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

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Shape AddChart(
	Object XlChartType,
	Object Left,
	Object Top,
	Object Width,
	Object Height
)

Parameters

XlChartType
Type: System.Object

The chart type.

Left
Type: System.Object

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).

Top
Type: System.Object

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

Width
Type: System.Object

The width, in points, of the object.

Height
Type: System.Object

The height, in points, of the object.

If the chart type is omitted, the default chart type for the application is used. If the position is omitted, the default size for the application is used.

Show: