AddChart Method (String, eChartType, ExcelPivotTable)

Office Open XML

Add a new chart to the worksheet. Do not support Bubble-, Radar-, Stock- or Surface charts.

Namespace:  OfficeOpenXml.Drawing
Assembly:  EPPlus (in EPPlus.dll) Version: 3.0.0.1 (3.0.0.1)

Syntax

C#
public ExcelChart AddChart(
	string Name,
	eChartType ChartType,
	ExcelPivotTable PivotTableSource
)
Visual Basic (Declaration)
Public Function AddChart ( _
	Name As String, _
	ChartType As eChartType, _
	PivotTableSource As ExcelPivotTable _
) As ExcelChart
Visual C++
public:
ExcelChart^ AddChart(
	String^ Name, 
	eChartType ChartType, 
	ExcelPivotTable^ PivotTableSource
)

Parameters

Name
Type: System..::.String

[Missing <param name="Name"/> documentation for "M:OfficeOpenXml.Drawing.ExcelDrawings.AddChart(System.String,OfficeOpenXml.Drawing.Chart.eChartType,OfficeOpenXml.Table.PivotTable.ExcelPivotTable)"]

ChartType
Type: OfficeOpenXml.Drawing.Chart..::.eChartType
Type of chart
PivotTableSource
Type: OfficeOpenXml.Table.PivotTable..::.ExcelPivotTable
The pivottable source for a pivotchart

Return Value

The chart

See Also