Aspose::Cells::Charts::ChartCollection class

ChartCollection class

Encapsulates a collection of Chart objects.

class ChartCollection

Methods

MethodDescription
Add(ChartType type, int32_t upperLeftRow, int32_t upperLeftColumn, int32_t lowerRightRow, int32_t lowerRightColumn)Adds a chart to the collection.
Add(const Vector <uint8_t>& data, const U16String& dataRange, bool isVertical, int32_t topRow, int32_t leftColumn, int32_t rightRow, int32_t bottomColumn)Adds a chart with preset template.
Add(const Vector <uint8_t>& data, const char16_t* dataRange, bool isVertical, int32_t topRow, int32_t leftColumn, int32_t rightRow, int32_t bottomColumn)Adds a chart with preset template.
Add(ChartType type, const U16String& dataRange, bool isVertical, int32_t topRow, int32_t leftColumn, int32_t rightRow, int32_t bottomColumn)Adds a chart to the collection.
Add(ChartType type, const char16_t* dataRange, bool isVertical, int32_t topRow, int32_t leftColumn, int32_t rightRow, int32_t bottomColumn)Adds a chart to the collection.
AddFloatingChart(ChartType type, int32_t left, int32_t top, int32_t width, int32_t height)Adds a chart to the collection.
ChartCollection(ChartCollection_Impl* impl)Constructs from an implementation object.
ChartCollection(const ChartCollection& src)Copy constructor.
Clear()Clear all charts.
Get(int32_t index)Gets the Chart element at the specified index.
Get(const U16String& name)Gets the chart by the name.
Get(const char16_t* name)Gets the chart by the name.
GetCount()
IsNull() constChecks whether the implementation object is nullptr.
explicit operator bool() constoperator bool()
operator=(const ChartCollection& src)operator=
RemoveAt(int32_t index)Remove a chart at the specific index.
~ChartCollection()Destructor.

Fields

FieldDescription
_implThe implementation object.

Examples

Aspose::Cells::Startup();
Workbook workbook;

ChartCollection charts = workbook.GetWorksheets().Get(0).GetCharts();

Aspose::Cells::Cleanup();

See Also