ChartCollection

Overview

ChartCollection is a class in Aspose.Cells FOSS for Typescript.

ChartCollection.length and ChartCollection.count both expose the total number of charts stored in the collection.

This class provides 11 methods for working with ChartCollection objects in Typescript programs. Available methods include: add, addWithDataRange, addWithOffset, clear, constructor, get, getByName, getChartInfos, removeAt, setWorksheet, toArray. All public members are accessible to any Typescript application after installing the Aspose.Cells FOSS for Typescript package. Properties: count, length.

Description

ChartCollection is a class in the Aspose.Cells FOSS library for TypeScript that exposes 10 methods and 2 properties for programmatic use.

Core capabilities include: number; number; creates a new chartcollection for the specified sheet index and worksheet. These operations enable developers to integrate chartcollection functionality directly into TypeScript applications.

The class also provides the length property (gets the length), the count property (gets the count).

Instances are created through a single constructor that initializes the object with default values.

Properties

NameTypeAccessDescription
lengthnumberReadGets the length.
countnumberReadGets the count.

Methods

SignatureDescription
constructor(sheetIndex: number, worksheet: Worksheet)Creates a new ChartCollection for the specified sheet index and worksheet.
setWorksheet(worksheet: Worksheet)Sets the worksheet value.
get(index: number)Chart | undefinedReturns the chart at the given index, or undefined if not found.
getByName(name: string)Chart | undefinedReturns the chart with the given name, or undefined if not found.
add(type: ChartType, topRow: number, leftColumn: number, bottomRow: number, rightColumn: number)numberReturns the numeric index of the newly added chart, which can be used with get(index) to retrieve the chart instance
addWithDataRange(type: ChartType, dataRange: string, isVertical: boolean, topRow: number, leftColumn: number, rightRow: number, bottomColumn: number)numberAdds a chart with the given type and data range, returning the index of the new chart.
addWithOffset(type: ChartType, topRow: number, top: number, leftColumn: number, left: number, height: number, width: number)numberAdds a chart with precise pixel-offset positioning, returning the index of the new chart.
removeAt(index: number)Removes the chart at the specified index.
clear()Removes all charts from the collection.
toArray()Chart[]Returns all charts in the collection as an array.
getChartInfos()Chart[]Returns the chart infos.

See Also