Aspose::Cells::Charts::IChartCollection Class Referenceabstract

Encapsulates a collection of Chart objects. More...

Inherits CollectionBase.

Public Member Functions

virtual Aspose::Cells::Systems::Int32 AddFloatingChart (Aspose::Cells::Charts::ChartType type, Aspose::Cells::Systems::Int32 left, Aspose::Cells::Systems::Int32 top, Aspose::Cells::Systems::Int32 width, Aspose::Cells::Systems::Int32 height)=0
 Adds a chart to the collection. More...
 
virtual Aspose::Cells::Systems::Int32 Add (Aspose::Cells::Charts::ChartType type, Aspose::Cells::Systems::Int32 upperLeftRow, Aspose::Cells::Systems::Int32 upperLeftColumn, Aspose::Cells::Systems::Int32 lowerRightRow, Aspose::Cells::Systems::Int32 lowerRightColumn)=0
 Adds a chart to the collection. More...
 
virtual Aspose::Cells::Systems::Int32 Add (Aspose::Cells::Charts::ChartType type, intrusive_ptr< Aspose::Cells::Systems::String > dataRange, Aspose::Cells::Systems::Int32 topRow, Aspose::Cells::Systems::Int32 leftColumn, Aspose::Cells::Systems::Int32 rightRow, Aspose::Cells::Systems::Int32 bottomColumn)=0
 Adds a chart to the collection. More...
 
virtual Aspose::Cells::Systems::Int32 Add (intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::Byte >> data, intrusive_ptr< Aspose::Cells::Systems::String > dataRange, bool isVertical, Aspose::Cells::Systems::Int32 topRow, Aspose::Cells::Systems::Int32 leftColumn, Aspose::Cells::Systems::Int32 rightRow, Aspose::Cells::Systems::Int32 bottomColumn)=0
 Adds a chart with preset template. More...
 
virtual Aspose::Cells::Systems::Int32 Add (Aspose::Cells::Charts::ChartType type, intrusive_ptr< Aspose::Cells::Systems::String > dataRange, bool isVertical, Aspose::Cells::Systems::Int32 topRow, Aspose::Cells::Systems::Int32 leftColumn, Aspose::Cells::Systems::Int32 rightRow, Aspose::Cells::Systems::Int32 bottomColumn)=0
 Adds a chart to the collection. More...
 
virtual intrusive_ptr< Aspose::Cells::Charts::IChartGetObjectByIndex (Aspose::Cells::Systems::Int32 index)=0
 Gets the IChart element at the specified index. More...
 
virtual intrusive_ptr< Aspose::Cells::Charts::IChartGetObjectByIndex (intrusive_ptr< Aspose::Cells::Systems::String > name)=0
 Gets the chart by the name. More...
 
virtual void RemoveAt (Aspose::Cells::Systems::Int32 index)=0
 Remove a chart at the specific index. More...
 
virtual void Clear ()=0
 Clear all charts. More...
 

Detailed Description

Encapsulates a collection of Chart objects.

[C++]
intrusive_ptr<IWorkbook> workbook = Factory::CreateIWorkbook();
intrusive_ptr<IChartCollection> charts = workbook->GetIWorksheets()->GetObjectByIndex(0)->GetICharts();

Member Function Documentation

◆ Add() [1/4]

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Charts::IChartCollection::Add ( Aspose::Cells::Charts::ChartType  type,
Aspose::Cells::Systems::Int32  upperLeftRow,
Aspose::Cells::Systems::Int32  upperLeftColumn,
Aspose::Cells::Systems::Int32  lowerRightRow,
Aspose::Cells::Systems::Int32  lowerRightColumn 
)
pure virtual

Adds a chart to the collection.

Parameters
typeChart type
upperLeftRowUpper left row index.
upperLeftColumnUpper left column index.
lowerRightRowLower right row index
lowerRightColumnLower right column index
Returns
IChart object index.

◆ Add() [2/4]

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Charts::IChartCollection::Add ( Aspose::Cells::Charts::ChartType  type,
intrusive_ptr< Aspose::Cells::Systems::String >  dataRange,
Aspose::Cells::Systems::Int32  topRow,
Aspose::Cells::Systems::Int32  leftColumn,
Aspose::Cells::Systems::Int32  rightRow,
Aspose::Cells::Systems::Int32  bottomColumn 
)
pure virtual

Adds a chart to the collection.

Parameters
typeChart type
dataRangeSpecifies the data range of the chart
upperLeftRowUpper left row index.
upperLeftColumnUpper left column index.
lowerRightRowLower right row index
lowerRightColumnLower right column index
Returns
IChart object index.

◆ Add() [3/4]

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Charts::IChartCollection::Add ( intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::Byte >>  data,
intrusive_ptr< Aspose::Cells::Systems::String >  dataRange,
bool  isVertical,
Aspose::Cells::Systems::Int32  topRow,
Aspose::Cells::Systems::Int32  leftColumn,
Aspose::Cells::Systems::Int32  rightRow,
Aspose::Cells::Systems::Int32  bottomColumn 
)
pure virtual

Adds a chart with preset template.

Parameters
dataThe data of chart template file(.crtx).
Parameters
dataRangeSpecifies the data range of the chart
isVerticalSpecifies whether to plot the series from a range of cell values by row or by column.
topRowUpper left row index.
leftColumnUpper left column index.
rightRowLower right row index
bottomColumnLower right column index
Returns
Chart object index.

◆ Add() [4/4]

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Charts::IChartCollection::Add ( Aspose::Cells::Charts::ChartType  type,
intrusive_ptr< Aspose::Cells::Systems::String >  dataRange,
bool  isVertical,
Aspose::Cells::Systems::Int32  topRow,
Aspose::Cells::Systems::Int32  leftColumn,
Aspose::Cells::Systems::Int32  rightRow,
Aspose::Cells::Systems::Int32  bottomColumn 
)
pure virtual

Adds a chart to the collection.

Parameters
typeChart type
dataRangeSpecifies the data range of the chart
isVerticalSpecifies whether to plot the series from a range of cell values by row or by column.
topRowUpper left row index.
leftColumnUpper left column index.
rightRowLower right row index
bottomColumnLower right column index
Returns
IChart object index.

◆ AddFloatingChart()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Charts::IChartCollection::AddFloatingChart ( Aspose::Cells::Charts::ChartType  type,
Aspose::Cells::Systems::Int32  left,
Aspose::Cells::Systems::Int32  top,
Aspose::Cells::Systems::Int32  width,
Aspose::Cells::Systems::Int32  height 
)
pure virtual

Adds a chart to the collection.

Parameters
typeChart type
leftThe x offset to corner
topThe y offset to corner
widthThe chart width
heightThe chart height
Returns
IChart object index.

◆ Clear()

virtual void Aspose::Cells::Charts::IChartCollection::Clear ( )
pure virtual

Clear all charts.

◆ GetObjectByIndex() [1/2]

virtual intrusive_ptr<Aspose::Cells::Charts::IChart> Aspose::Cells::Charts::IChartCollection::GetObjectByIndex ( Aspose::Cells::Systems::Int32  index)
pure virtual

Gets the IChart element at the specified index.

Parameters
indexThe zero based index of the element.
Returns
The element at the specified index.

◆ GetObjectByIndex() [2/2]

virtual intrusive_ptr<Aspose::Cells::Charts::IChart> Aspose::Cells::Charts::IChartCollection::GetObjectByIndex ( intrusive_ptr< Aspose::Cells::Systems::String >  name)
pure virtual

Gets the chart by the name.

Parameters
nameThe chart name.
Returns
The chart.

The default chart name is null. So you have to explicitly set the name of the chart.

◆ RemoveAt()

virtual void Aspose::Cells::Charts::IChartCollection::RemoveAt ( Aspose::Cells::Systems::Int32  index)
pure virtual

Remove a chart at the specific index.

Parameters
indexThe chart index.