Skip to main content

ChartCollection Methods

A collection of Chart objects in a worksheet.
Name Description
Add(ChartType, CellRange) Creates a chart of the specified type with data from the specified range and adds the chart to the collection.
Add(ChartType) Creates a chart of the specified type and adds it to the collection.
AddFromTemplate(Stream, CellRange) Loads a chart template from the stream, binds it to data from the specified range, and adds the chart to the collection.
AddFromTemplate(Stream) Loads a chart template from the stream and adds the chart to the collection.
Clear() Removes all objects from the ChartCollection instance.
Contains(Chart) Determines whether the collection contains the specified item.
CopyTo(Array, Int32) Copies the elements of the ICollection to an Array, starting at a particular Array index. Inherited from ICollection.
GetChartById(Int32) Gets a chart by its ID value.
GetCharts(String) Get chart(s) by name.
GetEnumerator() Returns an enumerator that iterates through the collection. Inherited from IEnumerable<T>.
IndexOf(Chart) Returns the index of the specified chart in the collection.
Remove(Chart) Removes the specified chart from a collection.
RemoveAt(Int32) Removes the element at the specified index of the ChartCollection instance.
See Also