SparklineGroup

Inheritance: java.lang.Object

public class SparklineGroup

Sparkline is organized into sparkline group. A SparklineGroup contains a variable number of sparkline items. A sparkline group specifies the type, display settings and axis settings for the sparklines.

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, "A1:D1", false, ca);
         SparklineGroup group = sheet.getSparklineGroupCollection().get(idx);
         group.getSparklineCollection().add(sheet.getName() + "!A1:D1", 0, 4);
         // Create CellsColor
         CellsColor clr = book.createCellsColor();
         clr.setColor(Color.getOrange());
         group.setSeriesColor(clr);
 
         // set the high points are colored green and the low points are colored red
         group.setShowHighPoint(true);
         group.setShowLowPoint(true);
         group.getHighPointColor().setColor(Color.getGreen());
         group.getLowPointColor().setColor(Color.getRed());
         // set line weight 
         group.setLineWeight(1.0);
         book.save("output.xlsx", SaveFormat.XLSX);

Methods

MethodDescription
equals(Object arg0)
getClass()
getDisplayHidden()Indicates whether to show data in hidden rows and columns.
getFirstPointColor()Gets the color of the first point of data in the sparkline group.
getHighPointColor()Gets the color of the highest points of data in the sparkline group.
getHorizontalAxisColor()Gets the color of the horizontal axis in the sparkline group.
getHorizontalAxisDateRange()Represents the range that contains the date values for the sparkline data.
getLastPointColor()Gets the color of the last point of data in the sparkline group.
getLineWeight()Gets the line weight in each line sparkline in the sparkline group, in the unit of points.
getLowPointColor()Gets the color of the lowest points of data in the sparkline group.
getMarkersColor()Gets the color of points in each line sparkline in the sparkline group.
getNegativePointsColor()Gets the color of the negative values on the sparkline group.
getPlotEmptyCellsType()Indicates how to plot empty cells.
getPlotRightToLeft()Indicates whether the plot data is right to left.
getPresetStyle()Gets the preset style type of the sparkline group.
getSeriesColor()Gets the color of the sparklines in the sparkline group.
getShowFirstPoint()Indicates whether to highlight the first point of data in the sparkline group.
getShowHighPoint()Indicates whether to highlight the highest points of data in the sparkline group.
getShowHorizontalAxis()Indicates whether to show the sparkline horizontal axis.
getShowLastPoint()Indicates whether to highlight the last point of data in the sparkline group.
getShowLowPoint()Indicates whether to highlight the lowest points of data in the sparkline group.
getShowMarkers()Indicates whether to highlight each point in each line sparkline in the sparkline group.
getShowNegativePoints()Indicates whether to highlight the negative values on the sparkline group with a different color or marker.
getSparklineCollection()Gets the collection of Sparkline object.
getSparklines()Gets the collection of Sparkline object.
getType()Indicates the sparkline type of the sparkline group.
getVerticalAxisMaxValue()Gets the custom maximum value for the vertical axis.
getVerticalAxisMaxValueType()Represents the vertical axis maximum value type.
getVerticalAxisMinValue()Gets the custom minimum value for the vertical axis.
getVerticalAxisMinValueType()Represents the vertical axis minimum value type.
hashCode()
notify()
notifyAll()
resetRanges(String dataRange, boolean isVertical, CellArea locationRange)Resets the data range and location range of the sparkline group.
setDisplayHidden(boolean value)Indicates whether to show data in hidden rows and columns.
setFirstPointColor(CellsColor value)Sets the color of the first point of data in the sparkline group.
setHighPointColor(CellsColor value)Sets the color of the highest points of data in the sparkline group.
setHorizontalAxisColor(CellsColor value)Sets the color of the horizontal axis in the sparkline group.
setHorizontalAxisDateRange(String value)Represents the range that contains the date values for the sparkline data.
setLastPointColor(CellsColor value)Sets the color of the last point of data in the sparkline group.
setLineWeight(double value)Sets the line weight in each line sparkline in the sparkline group, in the unit of points.
setLowPointColor(CellsColor value)Sets the color of the lowest points of data in the sparkline group.
setMarkersColor(CellsColor value)Sets the color of points in each line sparkline in the sparkline group.
setNegativePointsColor(CellsColor value)Sets the color of the negative values on the sparkline group.
setPlotEmptyCellsType(int value)Indicates how to plot empty cells.
setPlotRightToLeft(boolean value)Indicates whether the plot data is right to left.
setPresetStyle(int value)Sets the preset style type of the sparkline group.
setSeriesColor(CellsColor value)Sets the color of the sparklines in the sparkline group.
setShowFirstPoint(boolean value)Indicates whether to highlight the first point of data in the sparkline group.
setShowHighPoint(boolean value)Indicates whether to highlight the highest points of data in the sparkline group.
setShowHorizontalAxis(boolean value)Indicates whether to show the sparkline horizontal axis.
setShowLastPoint(boolean value)Indicates whether to highlight the last point of data in the sparkline group.
setShowLowPoint(boolean value)Indicates whether to highlight the lowest points of data in the sparkline group.
setShowMarkers(boolean value)Indicates whether to highlight each point in each line sparkline in the sparkline group.
setShowNegativePoints(boolean value)Indicates whether to highlight the negative values on the sparkline group with a different color or marker.
setType(int value)Indicates the sparkline type of the sparkline group.
setVerticalAxisMaxValue(double value)Sets the custom maximum value for the vertical axis.
setVerticalAxisMaxValueType(int value)Represents the vertical axis maximum value type.
setVerticalAxisMinValue(double value)Sets the custom minimum value for the vertical axis.
setVerticalAxisMinValueType(int value)Represents the vertical axis minimum value type.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDisplayHidden()

public boolean getDisplayHidden()

Indicates whether to show data in hidden rows and columns.

Returns: boolean

getFirstPointColor()

public CellsColor getFirstPointColor()

Gets the color of the first point of data in the sparkline group.

Returns: CellsColor

getHighPointColor()

public CellsColor getHighPointColor()

Gets the color of the highest points of data in the sparkline group.

Returns: CellsColor

getHorizontalAxisColor()

public CellsColor getHorizontalAxisColor()

Gets the color of the horizontal axis in the sparkline group.

Returns: CellsColor

getHorizontalAxisDateRange()

public String getHorizontalAxisDateRange()

Represents the range that contains the date values for the sparkline data.

Returns: java.lang.String

getLastPointColor()

public CellsColor getLastPointColor()

Gets the color of the last point of data in the sparkline group.

Returns: CellsColor

getLineWeight()

public double getLineWeight()

Gets the line weight in each line sparkline in the sparkline group, in the unit of points.

Returns: double

getLowPointColor()

public CellsColor getLowPointColor()

Gets the color of the lowest points of data in the sparkline group.

Returns: CellsColor

getMarkersColor()

public CellsColor getMarkersColor()

Gets the color of points in each line sparkline in the sparkline group.

Returns: CellsColor

getNegativePointsColor()

public CellsColor getNegativePointsColor()

Gets the color of the negative values on the sparkline group.

Returns: CellsColor

getPlotEmptyCellsType()

public int getPlotEmptyCellsType()

Indicates how to plot empty cells.

See PlotEmptyCellsType.

Returns: int

getPlotRightToLeft()

public boolean getPlotRightToLeft()

Indicates whether the plot data is right to left.

Returns: boolean

getPresetStyle()

public int getPresetStyle()

Gets the preset style type of the sparkline group.

See SparklinePresetStyleType.

Returns: int

getSeriesColor()

public CellsColor getSeriesColor()

Gets the color of the sparklines in the sparkline group.

Returns: CellsColor

getShowFirstPoint()

public boolean getShowFirstPoint()

Indicates whether to highlight the first point of data in the sparkline group.

Returns: boolean

getShowHighPoint()

public boolean getShowHighPoint()

Indicates whether to highlight the highest points of data in the sparkline group.

Returns: boolean

getShowHorizontalAxis()

public boolean getShowHorizontalAxis()

Indicates whether to show the sparkline horizontal axis. The horizontal axis appears if the sparkline has data that crosses the zero axis.

Returns: boolean

getShowLastPoint()

public boolean getShowLastPoint()

Indicates whether to highlight the last point of data in the sparkline group.

Returns: boolean

getShowLowPoint()

public boolean getShowLowPoint()

Indicates whether to highlight the lowest points of data in the sparkline group.

Returns: boolean

getShowMarkers()

public boolean getShowMarkers()

Indicates whether to highlight each point in each line sparkline in the sparkline group.

Returns: boolean

getShowNegativePoints()

public boolean getShowNegativePoints()

Indicates whether to highlight the negative values on the sparkline group with a different color or marker.

Returns: boolean

getSparklineCollection()

public SparklineCollection getSparklineCollection()

Gets the collection of Sparkline object.

Remarks

NOTE: This member is now obsolete. Instead, please use SparklineGroup.Sparklines property. This property will be removed 12 months later since November 2022. Aspose apologizes for any inconvenience you may have experienced.

Returns: SparklineCollection

getSparklines()

public SparklineCollection getSparklines()

Gets the collection of Sparkline object.

Returns: SparklineCollection

getType()

public int getType()

Indicates the sparkline type of the sparkline group.

See SparklineType.

Returns: int

getVerticalAxisMaxValue()

public double getVerticalAxisMaxValue()

Gets the custom maximum value for the vertical axis.

Returns: double

getVerticalAxisMaxValueType()

public int getVerticalAxisMaxValueType()

Represents the vertical axis maximum value type.

See SparklineAxisMinMaxType.

Returns: int

getVerticalAxisMinValue()

public double getVerticalAxisMinValue()

Gets the custom minimum value for the vertical axis.

Returns: double

getVerticalAxisMinValueType()

public int getVerticalAxisMinValueType()

Represents the vertical axis minimum value type.

See SparklineAxisMinMaxType.

Returns: int

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

resetRanges(String dataRange, boolean isVertical, CellArea locationRange)

public void resetRanges(String dataRange, boolean isVertical, CellArea locationRange)

Resets the data range and location range of the sparkline group. This method will clear original sparkline items in the group and creates new sparkline items for the new ranges.

Parameters:

ParameterTypeDescription
dataRangejava.lang.StringSpecifies the new data range of the sparkline group.
isVerticalbooleanSpecifies whether to plot the sparklines from the new data range by row or by column.
locationRangeCellAreaSpecifies where the sparklines to be placed.

setDisplayHidden(boolean value)

public void setDisplayHidden(boolean value)

Indicates whether to show data in hidden rows and columns.

Parameters:

ParameterTypeDescription
valueboolean

setFirstPointColor(CellsColor value)

public void setFirstPointColor(CellsColor value)

Sets the color of the first point of data in the sparkline group.

Parameters:

ParameterTypeDescription
valueCellsColor

setHighPointColor(CellsColor value)

public void setHighPointColor(CellsColor value)

Sets the color of the highest points of data in the sparkline group.

Parameters:

ParameterTypeDescription
valueCellsColor

setHorizontalAxisColor(CellsColor value)

public void setHorizontalAxisColor(CellsColor value)

Sets the color of the horizontal axis in the sparkline group.

Parameters:

ParameterTypeDescription
valueCellsColor

setHorizontalAxisDateRange(String value)

public void setHorizontalAxisDateRange(String value)

Represents the range that contains the date values for the sparkline data.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setLastPointColor(CellsColor value)

public void setLastPointColor(CellsColor value)

Sets the color of the last point of data in the sparkline group.

Parameters:

ParameterTypeDescription
valueCellsColor

setLineWeight(double value)

public void setLineWeight(double value)

Sets the line weight in each line sparkline in the sparkline group, in the unit of points.

Parameters:

ParameterTypeDescription
valuedouble

setLowPointColor(CellsColor value)

public void setLowPointColor(CellsColor value)

Sets the color of the lowest points of data in the sparkline group.

Parameters:

ParameterTypeDescription
valueCellsColor

setMarkersColor(CellsColor value)

public void setMarkersColor(CellsColor value)

Sets the color of points in each line sparkline in the sparkline group.

Parameters:

ParameterTypeDescription
valueCellsColor

setNegativePointsColor(CellsColor value)

public void setNegativePointsColor(CellsColor value)

Sets the color of the negative values on the sparkline group.

Parameters:

ParameterTypeDescription
valueCellsColor

setPlotEmptyCellsType(int value)

public void setPlotEmptyCellsType(int value)

Indicates how to plot empty cells.

See PlotEmptyCellsType.

Parameters:

ParameterTypeDescription
valueint

setPlotRightToLeft(boolean value)

public void setPlotRightToLeft(boolean value)

Indicates whether the plot data is right to left.

Parameters:

ParameterTypeDescription
valueboolean

setPresetStyle(int value)

public void setPresetStyle(int value)

Sets the preset style type of the sparkline group.

See SparklinePresetStyleType.

Parameters:

ParameterTypeDescription
valueint

setSeriesColor(CellsColor value)

public void setSeriesColor(CellsColor value)

Sets the color of the sparklines in the sparkline group.

Parameters:

ParameterTypeDescription
valueCellsColor

setShowFirstPoint(boolean value)

public void setShowFirstPoint(boolean value)

Indicates whether to highlight the first point of data in the sparkline group.

Parameters:

ParameterTypeDescription
valueboolean

setShowHighPoint(boolean value)

public void setShowHighPoint(boolean value)

Indicates whether to highlight the highest points of data in the sparkline group.

Parameters:

ParameterTypeDescription
valueboolean

setShowHorizontalAxis(boolean value)

public void setShowHorizontalAxis(boolean value)

Indicates whether to show the sparkline horizontal axis. The horizontal axis appears if the sparkline has data that crosses the zero axis.

Parameters:

ParameterTypeDescription
valueboolean

setShowLastPoint(boolean value)

public void setShowLastPoint(boolean value)

Indicates whether to highlight the last point of data in the sparkline group.

Parameters:

ParameterTypeDescription
valueboolean

setShowLowPoint(boolean value)

public void setShowLowPoint(boolean value)

Indicates whether to highlight the lowest points of data in the sparkline group.

Parameters:

ParameterTypeDescription
valueboolean

setShowMarkers(boolean value)

public void setShowMarkers(boolean value)

Indicates whether to highlight each point in each line sparkline in the sparkline group.

Parameters:

ParameterTypeDescription
valueboolean

setShowNegativePoints(boolean value)

public void setShowNegativePoints(boolean value)

Indicates whether to highlight the negative values on the sparkline group with a different color or marker.

Parameters:

ParameterTypeDescription
valueboolean

setType(int value)

public void setType(int value)

Indicates the sparkline type of the sparkline group.

See SparklineType.

Parameters:

ParameterTypeDescription
valueint

setVerticalAxisMaxValue(double value)

public void setVerticalAxisMaxValue(double value)

Sets the custom maximum value for the vertical axis.

Parameters:

ParameterTypeDescription
valuedouble

setVerticalAxisMaxValueType(int value)

public void setVerticalAxisMaxValueType(int value)

Represents the vertical axis maximum value type.

See SparklineAxisMinMaxType.

Parameters:

ParameterTypeDescription
valueint

setVerticalAxisMinValue(double value)

public void setVerticalAxisMinValue(double value)

Sets the custom minimum value for the vertical axis.

Parameters:

ParameterTypeDescription
valuedouble

setVerticalAxisMinValueType(int value)

public void setVerticalAxisMinValueType(int value)

Represents the vertical axis minimum value type.

See SparklineAxisMinMaxType.

Parameters:

ParameterTypeDescription
valueint

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int