[]
Creates a chart at the specified location in this chart.
The new chart is positioned relative to the upper-left corner of the chart area, and the returned IShape represents the created chart shape.
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
| Type | Name | Description |
|---|---|---|
| ChartType | chartType | The type of chart to create. |
| double | left | The distance from the left edge of the new chart to the left edge of the chart area, in points. |
| double | top | The distance from the top edge of the new chart to the top edge of the chart area, in points. |
| double | width | The width of the new chart, in points. |
| double | height | The height of the new chart, in points. |
| Type | Description |
|---|---|
| IShape | The IShape object that represents the new chart. |
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200).Chart;
IShape insetChart = chart.AddChart(ChartType.Line, 30, 25, 120, 90);