com.aspose.cells

Class ChartCollection

  • All Implemented Interfaces:
    java.lang.Iterable
    public class ChartCollection 
    extends CollectionBase

Encapsulates a collection of Chart objects.

Example:

Workbook workbook = new Workbook();

ChartCollection charts = workbook.getWorksheets().get(0).getCharts();

Property Getters/Setters Summary
intgetCount()
Chartget(int index)
Gets the Chart element at the specified index.
Chartget(java.lang.String name)
Gets the chart by the name.
 
Method Summary
intadd(int type, int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn)
Adds a chart to the collection.
intadd(java.lang.Object value)
Reserved for internal use.
intaddFloatingChart(int type, int left, int top, int width, int height)
Adds a chart to the collection.
voidclear()
Clear all charts.
booleancontains(java.lang.Object value)
Reserved for internal use.
intindexOf(java.lang.Object value)
Reserved for internal use.
java.util.Iteratoriterator()
voidremove(Chart chart)
Remove the specific chart.
voidremoveAt(int index)
Remove a chart at the specific index.
 

    • Property Getters/Setters Detail

      • getCount

        public int getCount()
        
      • get

        public Chart get(int 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

        public Chart get(java.lang.String 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

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

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

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

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

        public void clear()
        Clear all charts.
      • iterator

        public java.util.Iterator iterator()
      • contains

        public boolean contains(java.lang.Object value)
        Reserved for internal use.
      • add

        public int add(java.lang.Object value)
        Reserved for internal use.
      • indexOf

        public int indexOf(java.lang.Object value)
        Reserved for internal use.