aspose.cells

Class ChartCollection

Encapsulates a collection of Chart objects.

Example:

$workbook = new cells\Workbook();
$charts = $workbook->getWorksheets()->get(0)->getCharts();

Property Getters/Setters Summary
functiongetCount()
functionget(index)
Gets the Chart element at the specified index.
functionget(name)
Gets the chart by the name.
 
Method Summary
functionadd(type, upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn)
Adds a chart to the collection.
functionadd(type, dataRange, upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn)
Adds a chart to the collection.
functionadd(value)
Reserved for internal use.
functionaddFloatingChart(type, left, top, width, height)
Adds a chart to the collection.
functionclear()
Clear all charts.
functioncontains(value)
Reserved for internal use.
functionget(index)
Reserved for internal use.
functionindexOf(value)
Reserved for internal use.
functioniterator()
functionremove(chart)
Remove the specific chart.
functionremoveAt(index)
Remove a chart at the specific index.
 

    • Property Getters/Setters Detail

      • getCount : Number 

        function getCount()
        
      • get : Chart 

        function 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 

        function 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

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

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

        function add(type, dataRange, upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn)
        Adds a chart to the collection.
        Parameters:
        type: Number - A ChartType value. Chart type
        dataRange: String - Specifies the data range of the chart
        upperLeftRow: Number - Upper left row index.
        upperLeftColumn: Number - Upper left column index.
        lowerRightRow: Number - Lower right row index
        lowerRightColumn: Number - Lower right column index
        Returns:
        Chart object index.
      • remove

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

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

        function clear()
        Clear all charts.
      • iterator

        function iterator()
      • get

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

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

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

        function indexOf(value)
        Reserved for internal use.