[]
Iterable<ISparkline>An ISparklineGroup contains the sparklines associated with a location range and provides access to shared group settings such as axes, display options, source data, and sparkline type.
worksheet.getRange("A1:C3").setValue(new Object[][] {
{1, 3, 2},
{2, 4, 1},
{3, 2, 5}
});
ISparklineGroup group = worksheet.getRange("D1:D3").getSparklineGroups().add(SparkType.Line, "A1:C3");
voiddelete()voidget(int index) ISparkline object at the specified index in the sparkline group.getAxes()ISparkAxes.intgetCount()booleandoubleIRange object that represents the location of the sparkline group.IFormatColor object that represents the main series color for the sparkline group.getType()voidsetDateRange(String value) voidvoidsetDisplayHidden(boolean value) voidsetLineWeight(double value) voidsetLocation(IRange value) IRange object that represents the location of the sparkline group.voidsetPlotBy(SparklineRowCol value) voidsetSourceData(String value) voidtoJson()forEach, iterator, spliteratorISparkline object at the specified index in the sparkline group.Use this method to access an individual sparkline contained in the group.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
ISparkline sparkline = group.get(0);
index - Index value of the sparkline.ISparkline object at the specified index.IndexOutOfBoundsException - if index is less than 0 or greater than or equal to getCount().ISparkAxes. Use the returned ISparkAxes object to access the horizontal and vertical axis settings for this sparkline group.
worksheet.getRange("A1:C1").setValue(new Object[][] {{10, 15, 8}});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
ISparkAxes axes = group.getAxes();
ISparkHorizontalAxis horizontalAxis = axes.getHorizontal();
ISparkAxes object.Use this method to determine how many individual sparklines are contained in the group.
worksheet.getRange("A1:C3").setValue(new Object[][] {
{1, 3, 2},
{4, 6, 5},
{7, 9, 8}
});
ISparklineGroup group = worksheet.getRange("D1:D3").getSparklineGroups().add(SparkType.Line, "A1:C3");
int count = group.getCount();
The date range specifies the cells that provide date-axis values for the sparkline group.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
worksheet.getRange("A2:C2").setValue(new Object[] {
new GregorianCalendar(2011, 11, 16),
new GregorianCalendar(2011, 11, 17),
new GregorianCalendar(2011, 11, 18)
});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setDateRange("A2:C2");
String dateRange = group.getDateRange();
The date range specifies the cells that provide date-axis values for the sparkline group.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
worksheet.getRange("A2:C2").setValue(new Object[] {
new GregorianCalendar(2011, 11, 16),
new GregorianCalendar(2011, 11, 17),
new GregorianCalendar(2011, 11, 18)
});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setDateRange("A2:C2");
value - The date range reference string for the sparkline group.Use this method to determine how blank values in the sparkline source data are displayed for the sparkline group.
worksheet.getRange("A1:C1").setValue(new Object[] {1, null, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setDisplayBlanksAs(DisplayBlanksAs.Zero);
DisplayBlanksAs blanksAs = group.getDisplayBlanksAs();
DisplayBlanksAs value that specifies how blank cells are plotted in the sparkline group.Use this method to control how blank values in the sparkline source data are displayed, such as plotting them as gaps, zero values, or interpolated points according to the specified DisplayBlanksAs setting.
worksheet.getRange("A1:C1").setValue(new Object[] {1, null, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setDisplayBlanksAs(DisplayBlanksAs.Zero);
value - The DisplayBlanksAs value that specifies how blank cells are plotted.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setDisplayHidden(true);
boolean displayHidden = group.getDisplayHidden();
true if hidden cells are plotted in the sparkline group; otherwise, false.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setDisplayHidden(true);
value - true if hidden cells are plotted in the sparkline group; otherwise, false.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setLineWeight(2.5);
double lineWeight = group.getLineWeight();
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setLineWeight(2.5);
value - The line width of the sparklines in the sparkline group.IRange object that represents the location of the sparkline group. The returned range identifies the cells where the sparklines in this group are displayed.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
IRange location = group.getLocation();
IRange object that represents the location of the sparkline group.IRange object that represents the location of the sparkline group. Use this method to move the sparklines in the group to another display range.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setLocation(worksheet.getRange("E1"));
value - The IRange object that represents the location of the sparkline group.The returned SparklineRowCol value indicates whether the source data is plotted by rows, by columns, or is not treated as a square-shaped range.
worksheet.getRange("A1:C3").setValue(new Object[][] {
{1, 3, 2},
{2, 4, 1},
{3, 2, 5}
});
ISparklineGroup group = worksheet.getRange("D1:D3").getSparklineGroups().add(SparkType.Line, "A1:C3");
group.setPlotBy(SparklineRowCol.RowsSquare);
SparklineRowCol plotBy = group.getPlotBy();
SparklineRowCol value that specifies how the sparkline is plotted when its source data is in a square-shaped range.Use SparklineRowCol to specify whether the source data is plotted by rows, by columns, or not treated as a square-shaped range.
worksheet.getRange("A1:C3").setValue(new Object[][] {
{1, 3, 2},
{2, 4, 1},
{3, 2, 5}
});
ISparklineGroup group = worksheet.getRange("D1:D3").getSparklineGroups().add(SparkType.Line, "A1:C3");
group.setPlotBy(SparklineRowCol.RowsSquare);
value - The SparklineRowCol value that specifies how the sparkline is plotted when its source data is in a square-shaped range.Returns an ISparkPoints object that provides access to marker settings such as first point, last point, high point, low point, negative points, and general markers for the sparkline group.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
ISparkPoints points = group.getPoints();
points.getMarkers().setVisible(true);
ISparkPoints object that represents the point marker settings for the sparkline group.IFormatColor object that represents the main series color for the sparkline group. Use the returned object to inspect or modify the color applied to the sparkline series.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
IFormatColor seriesColor = group.getSeriesColor();
seriesColor.setColor(Color.GetBlue());
IFormatColor object that represents the main series color for the sparkline group.The returned value is a range reference string that identifies the cells used to generate the sparklines in the group.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
String sourceData = group.getSourceData();
Use this method to set the range reference string that identifies the cells used to generate the sparklines in the group.
worksheet.getRange("A1:D1").setValue(new Object[] {1, 3, 2, 4});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setSourceData("A1:D1");
value - The range reference string that contains the source data for the sparkline group.Use this method to determine whether the group is configured as a line, column, or win/loss style sparkline as defined by SparkType.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
SparkType type = group.getType();
SparkType of the sparkline group.Use this method to change how the sparklines in the group are rendered, such as switching between line and column sparklines.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.setType(SparkType.Column);
value - The sparkline type to apply to the group.Use this method to remove the current sparkline group after it has been added to a worksheet range.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
group.delete();
Use this method to restore the sparkline group's settings from JSON that was previously generated by toJson().
worksheet.getRange("A1:C4").setValue(new Object[][] {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9},
{10, 11, 12}
});
ISparklineGroup sparklineGroup = worksheet.getRange("D1:D4").getSparklineGroups().add(SparkType.Line, "A1:C4");
String json = sparklineGroup.toJson();
sparklineGroup.fromJson(json);
json - The JSON string representing the sparkline group.Use this method to serialize the current sparkline group definition so that it can be reused with fromJson(String) or stored for later use.
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup group = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
String json = group.toJson();