Modifica

Condividi tramite


Shapes.AddChart2 Method

Definition

Adds a chart to the document. Returns a Shape object that represents a chart and adds it to the specified collection.

public Microsoft.Office.Interop.Excel.Shape AddChart2 (object Style, object XlChartType, object Left, object Top, object Width, object Height, object NewLayout);
Public Function AddChart2 (Optional Style As Object, Optional XlChartType As Object, Optional Left As Object, Optional Top As Object, Optional Width As Object, Optional Height As Object, Optional NewLayout As Object) As Shape

Parameters

Style
Object

The chart style. Use -1 to get the default style for the type of chart specified in XlChartType

XlChartType
Object

The type of chart.

Left
Object

The position, in points, of the left edge of the chart, relative to the anchor.

Top
Object

The position, in points, of the top edge of the chart, relative to the anchor.

Width
Object

The width, in points, of the chart.

Height
Object

The height, in points, of the chart.

NewLayout
Object

If NewLayout is true, the chart is inserted by using the new dynamic formatting rules (Title is on, and Legend is on only if there are multiple series).

Returns

Applies to