java.lang.Object
com.aspose.cells.SparklineGroup
public class SparklineGroup
- extends java.lang.Object
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);
|
Method Summary |
void | resetRanges(java.lang.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.
|
|
Property Getters/Setters Detail |
getPresetStyle/setPresetStyle | |
public int getPresetStyle() / public void setPresetStyle(int value)
|
-
Gets and sets the preset style type of the sparkline group.
The value of the property is SparklinePresetStyleType integer constant.
setPresetStyle | |
public void setPresetStyle(int value)
|
-
Gets and sets the preset style type of the sparkline group.
The value of the property is SparklinePresetStyleType integer constant.
-
Gets the SparklineCollection object of the sparkline group.
getType/setType | |
public int getType() / public void setType(int value)
|
-
Indicates the sparkline type of the sparkline group.
The value of the property is SparklineType integer constant.
setType | |
public void setType(int value)
|
-
Indicates the sparkline type of the sparkline group.
The value of the property is SparklineType integer constant.
getPlotEmptyCellsType/setPlotEmptyCellsType | |
public int getPlotEmptyCellsType() / public void setPlotEmptyCellsType(int value)
|
-
Indicates how to plot empty cells.
The value of the property is PlotEmptyCellsType integer constant.
setPlotEmptyCellsType | |
public void setPlotEmptyCellsType(int value)
|
-
Indicates how to plot empty cells.
The value of the property is PlotEmptyCellsType integer constant.
getDisplayHidden/setDisplayHidden | |
public boolean getDisplayHidden() / public void setDisplayHidden(boolean value)
|
-
Indicates whether to show data in hidden rows and columns.
setDisplayHidden | |
public void setDisplayHidden(boolean value)
|
-
Indicates whether to show data in hidden rows and columns.
getShowHighPoint/setShowHighPoint | |
public boolean getShowHighPoint() / public void setShowHighPoint(boolean value)
|
-
Indicates whether to highlight the highest points of data in the sparkline group.
setShowHighPoint | |
public void setShowHighPoint(boolean value)
|
-
Indicates whether to highlight the highest points of data in the sparkline group.
getHighPointColor/setHighPointColor | |
public CellsColor getHighPointColor() / public void setHighPointColor(CellsColor value)
|
-
Gets and sets the color of the highest points of data in the sparkline group.
setHighPointColor | |
public void setHighPointColor(CellsColor value)
|
-
Gets and sets the color of the highest points of data in the sparkline group.
getShowLowPoint/setShowLowPoint | |
public boolean getShowLowPoint() / public void setShowLowPoint(boolean value)
|
-
Indicates whether to highlight the lowest points of data in the sparkline group.
setShowLowPoint | |
public void setShowLowPoint(boolean value)
|
-
Indicates whether to highlight the lowest points of data in the sparkline group.
getLowPointColor/setLowPointColor | |
public CellsColor getLowPointColor() / public void setLowPointColor(CellsColor value)
|
-
Gets and sets the color of the lowest points of data in the sparkline group.
setLowPointColor | |
public void setLowPointColor(CellsColor value)
|
-
Gets and sets the color of the lowest points of data in the sparkline group.
getShowNegativePoints/setShowNegativePoints | |
public boolean getShowNegativePoints() / public void setShowNegativePoints(boolean value)
|
-
Indicates whether to highlight the negative values on the sparkline group with a different color or marker.
setShowNegativePoints | |
public void setShowNegativePoints(boolean value)
|
-
Indicates whether to highlight the negative values on the sparkline group with a different color or marker.
getNegativePointsColor/setNegativePointsColor | |
public CellsColor getNegativePointsColor() / public void setNegativePointsColor(CellsColor value)
|
-
Gets and sets the color of the negative values on the sparkline group.
setNegativePointsColor | |
public void setNegativePointsColor(CellsColor value)
|
-
Gets and sets the color of the negative values on the sparkline group.
getShowFirstPoint/setShowFirstPoint | |
public boolean getShowFirstPoint() / public void setShowFirstPoint(boolean value)
|
-
Indicates whether to highlight the first point of data in the sparkline group.
setShowFirstPoint | |
public void setShowFirstPoint(boolean value)
|
-
Indicates whether to highlight the first point of data in the sparkline group.
getFirstPointColor/setFirstPointColor | |
public CellsColor getFirstPointColor() / public void setFirstPointColor(CellsColor value)
|
-
Gets and sets the color of the first point of data in the sparkline group.
setFirstPointColor | |
public void setFirstPointColor(CellsColor value)
|
-
Gets and sets the color of the first point of data in the sparkline group.
getShowLastPoint/setShowLastPoint | |
public boolean getShowLastPoint() / public void setShowLastPoint(boolean value)
|
-
Indicates whether to highlight the last point of data in the sparkline group.
setShowLastPoint | |
public void setShowLastPoint(boolean value)
|
-
Indicates whether to highlight the last point of data in the sparkline group.
getLastPointColor/setLastPointColor | |
public CellsColor getLastPointColor() / public void setLastPointColor(CellsColor value)
|
-
Gets and sets the color of the last point of data in the sparkline group.
setLastPointColor | |
public void setLastPointColor(CellsColor value)
|
-
Gets and sets the color of the last point of data in the sparkline group.
getShowMarkers/setShowMarkers | |
public boolean getShowMarkers() / public void setShowMarkers(boolean value)
|
-
Indicates whether to highlight each point in each line sparkline in the sparkline group.
setShowMarkers | |
public void setShowMarkers(boolean value)
|
-
Indicates whether to highlight each point in each line sparkline in the sparkline group.
getMarkersColor/setMarkersColor | |
public CellsColor getMarkersColor() / public void setMarkersColor(CellsColor value)
|
-
Gets and sets the color of points in each line sparkline in the sparkline group.
setMarkersColor | |
public void setMarkersColor(CellsColor value)
|
-
Gets and sets the color of points in each line sparkline in the sparkline group.
getSeriesColor/setSeriesColor | |
public CellsColor getSeriesColor() / public void setSeriesColor(CellsColor value)
|
-
Gets and sets the color of the sparklines in the sparkline group.
setSeriesColor | |
public void setSeriesColor(CellsColor value)
|
-
Gets and sets the color of the sparklines in the sparkline group.
getPlotRightToLeft/setPlotRightToLeft | |
public boolean getPlotRightToLeft() / public void setPlotRightToLeft(boolean value)
|
-
Indicates whether the plot data is right to left.
setPlotRightToLeft | |
public void setPlotRightToLeft(boolean value)
|
-
Indicates whether the plot data is right to left.
getLineWeight/setLineWeight | |
public double getLineWeight() / public void setLineWeight(double value)
|
-
Gets and sets the line weight in each line sparkline in the sparkline group, in the unit of points.
setLineWeight | |
public void setLineWeight(double value)
|
-
Gets and sets the line weight in each line sparkline in the sparkline group, in the unit of points.
getHorizontalAxisColor/setHorizontalAxisColor | |
public CellsColor getHorizontalAxisColor() / public void setHorizontalAxisColor(CellsColor value)
|
-
Gets and sets the color of the horizontal axis in the sparkline group.
setHorizontalAxisColor | |
public void setHorizontalAxisColor(CellsColor value)
|
-
Gets and sets the color of the horizontal axis in the sparkline group.
getShowHorizontalAxis/setShowHorizontalAxis | |
public boolean getShowHorizontalAxis() / 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.
setShowHorizontalAxis | |
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.
getHorizontalAxisDateRange/setHorizontalAxisDateRange | |
public java.lang.String getHorizontalAxisDateRange() / public void setHorizontalAxisDateRange(java.lang.String value)
|
-
Represents the range that contains the date values for the sparkline data.
setHorizontalAxisDateRange | |
public void setHorizontalAxisDateRange(java.lang.String value)
|
-
Represents the range that contains the date values for the sparkline data.
getVerticalAxisMaxValueType/setVerticalAxisMaxValueType | |
public int getVerticalAxisMaxValueType() / public void setVerticalAxisMaxValueType(int value)
|
-
Represents the vertical axis maximum value type.
The value of the property is SparklineAxisMinMaxType integer constant.
setVerticalAxisMaxValueType | |
public void setVerticalAxisMaxValueType(int value)
|
-
Represents the vertical axis maximum value type.
The value of the property is SparklineAxisMinMaxType integer constant.
getVerticalAxisMaxValue/setVerticalAxisMaxValue | |
public double getVerticalAxisMaxValue() / public void setVerticalAxisMaxValue(double value)
|
-
Gets and sets the custom maximum value for the vertical axis.
setVerticalAxisMaxValue | |
public void setVerticalAxisMaxValue(double value)
|
-
Gets and sets the custom maximum value for the vertical axis.
getVerticalAxisMinValueType/setVerticalAxisMinValueType | |
public int getVerticalAxisMinValueType() / public void setVerticalAxisMinValueType(int value)
|
-
Represents the vertical axis minimum value type.
The value of the property is SparklineAxisMinMaxType integer constant.
setVerticalAxisMinValueType | |
public void setVerticalAxisMinValueType(int value)
|
-
Represents the vertical axis minimum value type.
The value of the property is SparklineAxisMinMaxType integer constant.
getVerticalAxisMinValue/setVerticalAxisMinValue | |
public double getVerticalAxisMinValue() / public void setVerticalAxisMinValue(double value)
|
-
Gets and sets the custom minimum value for the vertical axis.
setVerticalAxisMinValue | |
public void setVerticalAxisMinValue(double value)
|
-
Gets and sets the custom minimum value for the vertical axis.
resetRanges | |
public void resetRanges(java.lang.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:
dataRange - Specifies the new data range of the sparkline group.isVertical - Specifies whether to plot the sparklines from the new data range by row or by column.locationRange - Specifies where the sparklines to be placed.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.