asposecells.api

Class ChartCollection

Encapsulates a collection of Chart objects.

Example:

workbook = Workbook()
charts = workbook.getWorksheets().get(0).getCharts()

Property Getters/Setters Summary
methodgetCount()
methodget(index)
Gets the Chart element at the specified index.
methodget(name)
Gets the chart by the name.
 
Method Summary
methodadd(data, dataRange, isVertical, topRow, leftColumn, rightRow, bottomColumn)
Adds a chart with preset template.
methodadd(type, upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn)
Adds a chart to the collection.
methodadd(type, dataRange, isVertical, topRow, leftColumn, rightRow, bottomColumn)
Adds a chart to the collection.
methodadd(type, dataRange, topRow, leftColumn, rightRow, bottomColumn)
Adds a chart to the collection.
methodadd(value)
Reserved for internal use.
methodaddFloatingChart(type, left, top, width, height)
Adds a chart to the collection.
methodclear()
Clear all charts.
methodcontains(value)
Reserved for internal use.
methodget(index)
Reserved for internal use.
methodindexOf(value)
Reserved for internal use.
methoditerator()
methodremove(chart)
Remove the specific chart.
methodremoveAt(index)
Remove a chart at the specific index.
 

    • Property Getters/Setters Detail

      • getCount : int 

        int getCount()
        
      • get : Chart 

        Chart get(index)
        
        Gets the Chart element at the specified index.
        Parameters:
        index - The zero based index of the element.
        Returns:
        The element at the specified index.
      • get : Chart 

        Chart get(name)
        
        Gets the chart by the name. The default chart name is null. So you have to explicitly set the name of the chart.
        Parameters:
        name - The chart name.
        Returns:
        The chart.
    • Method Detail

      • addFloatingChart

        int addFloatingChart(type, left, top, width, height)
        Adds a chart to the collection.
        Parameters:
        type: int - A ChartType value. Chart type
        left: int - The x offset to corner
        top: int - The y offset to corner
        width: int - The chart width
        height: int - The chart height
        Returns:
        Chart object index.
      • add

        int add(type, upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn)
        Adds a chart to the collection.
        Parameters:
        type: int - A ChartType value. Chart type
        upperLeftRow: int - Upper left row index.
        upperLeftColumn: int - Upper left column index.
        lowerRightRow: int - Lower right row index
        lowerRightColumn: int - Lower right column index
        Returns:
        Chart object index.
      • add

        int add(type, dataRange, topRow, leftColumn, rightRow, bottomColumn)
        Adds a chart to the collection. NOTE: This member is now obsolete. Instead, please use add(int, java.lang.String, boolean, int, int, int, int) property. This property will be removed 12 months later since May 2022. Aspose apologizes for any inconvenience you may have experienced.
        Parameters:
        type: int - A ChartType value. Chart type
        dataRange: String - Specifies the data range of the chart
        topRow: int - Upper left row index.
        leftColumn: int - Upper left column index.
        rightRow: int - Lower right row index
        bottomColumn: int - Lower right column index
        Returns:
        Chart object index.
      • add

        int add(data, dataRange, isVertical, topRow, leftColumn, rightRow, bottomColumn)
        Adds a chart with preset template.
        Parameters:
        data: byte[] - The data of chart template file(.crtx).
        dataRange: String - Specifies the data range of the chart
        isVertical: boolean - Specifies whether to plot the series from a range of cell values by row or by column.
        topRow: int - Upper left row index.
        leftColumn: int - Upper left column index.
        rightRow: int - Lower right row index
        bottomColumn: int - Lower right column index
        Returns:
        Chart object index.
      • add

        int add(type, dataRange, isVertical, topRow, leftColumn, rightRow, bottomColumn)
        Adds a chart to the collection.
        Parameters:
        type: int - A ChartType value. Chart type
        dataRange: String - Specifies the data range of the chart
        isVertical: boolean - Specifies whether to plot the series from a range of cell values by row or by column.
        topRow: int - Upper left row index.
        leftColumn: int - Upper left column index.
        rightRow: int - Lower right row index
        bottomColumn: int - Lower right column index
        Returns:
        Chart object index.
      • remove

         remove(chart)
        Remove the specific chart.
        Parameters:
        chart: Chart -
      • removeAt

         removeAt(index)
        Remove a chart at the specific index.
        Parameters:
        index: int - The chart index.
      • clear

         clear()
        Clear all charts.
      • iterator

        Iterator iterator()
      • get

        Object get(index)
        Reserved for internal use.
      • contains

        boolean contains(value)
        Reserved for internal use.
      • add

        int add(value)
        Reserved for internal use.
      • indexOf

        int indexOf(value)
        Reserved for internal use.