com.aspose.cells
Class SparklineCollection

java.lang.Object
  extended by CollectionBase
      extended by com.aspose.cells.SparklineCollection
All Implemented Interfaces:
java.lang.Iterable

public class SparklineCollection 
extends CollectionBase

Encapsulates a collection of Sparkline objects.

Example:

Workbook book = new Workbook(); 
Worksheet sheet = book.getWorksheets().get(0);
        
sheet.getCells().get("A1").putValue(5);
sheet.getCells().get("B1").putValue(2);
sheet.getCells().get("C1").putValue(1);
sheet.getCells().get("D1").putValue(3);

// Define the CellArea
CellArea ca = new CellArea();
ca.StartColumn = 4;
ca.EndColumn = 4;
ca.StartRow = 0;
ca.EndRow = 0;

int idx = sheet.getSparklineGroupCollection().add(com.aspose.cells.SparklineType.LINE, sheet.getName() + "!A1:D1", false, ca);
SparklineGroup group = sheet.getSparklineGroupCollection().get(idx);
group.getSparklineCollection().add(sheet.getName() + "!A1:D1", 0, 4);
book.save("output.xlsx", SaveFormat.XLSX);


Property Getters/Setters Summary
intgetCount()→ inherited from com.aspose.cells.CollectionBase
          
Sparklineget(int)
           Gets the Sparkline element at the specified index.
 
Method Summary
intadd(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
intadd(java.lang.String dataRange, int row, int column)
           Add a sparkline.
voidclear()→ inherited from com.aspose.cells.CollectionBase
          
booleancontains(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
intindexOf(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
java.util.Iteratoriterator()→ inherited from com.aspose.cells.CollectionBase
          
voidremove(java.lang.Object o)
           Removes the sparkline
voidremoveAt(int index)→ inherited from com.aspose.cells.CollectionBase
          
 

Property Getters/Setters Detail

getCount

→ inherited from com.aspose.cells.CollectionBase
public int getCount()

get

public Sparkline get(int index)
Gets the Sparkline element at the specified index.
Parameters:
index - The zero based index of the element.
Returns:
The element at the specified index.

Method Detail

add

public int add(java.lang.String dataRange, int row, int column)
Add a sparkline.
Parameters:
dataRange - Specifies the new data range of the sparkline.
row - The row index of the location.
column - The column index of the location.

remove

public void remove(java.lang.Object o)
Removes the sparkline
Parameters:
o -

clear

→ inherited from com.aspose.cells.CollectionBase
public void clear()

removeAt

→ inherited from com.aspose.cells.CollectionBase
public void removeAt(int index)

iterator

→ inherited from com.aspose.cells.CollectionBase
public java.util.Iterator iterator()

contains

→ inherited from com.aspose.cells.CollectionBase
public boolean contains(java.lang.Object value)
Reserved for internal use.

add

→ inherited from com.aspose.cells.CollectionBase
public int add(java.lang.Object value)
Reserved for internal use.

indexOf

→ inherited from com.aspose.cells.CollectionBase
public int indexOf(java.lang.Object value)
Reserved for internal use.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.