public class SparklineGroupCollection extends CollectionBase
SparklineGroup 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.getSparklineGroups().add(com.aspose.cells.SparklineType.LINE, "A1:D1", false, ca);
SparklineGroup group = sheet.getSparklineGroups().get(idx);
group.getSparklines().add(sheet.getName() + "!A1:D1", 0, 4);
book.save("output.xlsx", SaveFormat.XLSX);
| Modifier and Type | Method and Description |
|---|---|
int |
add(int type)
Adds an
SparklineGroup with a Sparkline to the collection. |
int |
add(int type,
java.lang.String dataRange,
boolean isVertical,
CellArea locationRange)
Adds an
SparklineGroup with Sparkline to the collection. |
void |
clearSparklineGroups(CellArea cellArea)
Clears the sparkline groups that overlaps an area of cells.
|
void |
clearSparklines(CellArea cellArea)
Clears the sparklines that is inside an area of cells.
|
SparklineGroup |
get(int index)
Gets the
SparklineGroup element at the specified index. |
public SparklineGroup get(int index)
SparklineGroup element at the specified index.get in class CollectionBaseindex - The zero based index of the element.public int add(int type)
SparklineGroup with a Sparkline to the collection.type - SparklineType. Specifies the type of the Sparkline group.SparklineGroup object index.public int add(int type,
java.lang.String dataRange,
boolean isVertical,
CellArea locationRange)
SparklineGroup with Sparkline to the collection.type - SparklineType. Specifies the type of the Sparkline group.dataRange - Specifies the data range of the sparkline group.isVertical - Specifies whether to plot the sparklines from the data range by row or by column.locationRange - Specifies where the sparklines to be placed.SparklineGroup object index.public void clearSparklines(CellArea cellArea)
cellArea - Specifies the area of cellspublic void clearSparklineGroups(CellArea cellArea)
cellArea - Specifies the area of cellsSee Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.