com.aspose.cells.Series.html Maven / Gradle / Ivy
Series
com.aspose.cells
Class Series
java.lang.Object
com.aspose.cells.Series
public class Series
- extends java.lang.Object
Example:
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Adding a new worksheet to the Excel object
int sheetIndex = workbook.getWorksheets().add();
//Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.getWorksheets().get(sheetIndex);
//Adding a sample value to "A1" cell
worksheet.getCells().get("A1").putValue(50);
//Adding a sample value to "A2" cell
worksheet.getCells().get("A2").putValue(100);
//Adding a sample value to "A3" cell
worksheet.getCells().get("A3").putValue(150);
//Adding a sample value to "A4" cell
worksheet.getCells().get("A4").putValue(200);
//Adding a sample value to "B1" cell
worksheet.getCells().get("B1").putValue(60);
//Adding a sample value to "B2" cell
worksheet.getCells().get("B2").putValue(32);
//Adding a sample value to "B3" cell
worksheet.getCells().get("B3").putValue(50);
//Adding a sample value to "B4" cell
worksheet.getCells().get("B4").putValue(40);
//Adding a sample value to "C1" cell as category data
worksheet.getCells().get("C1").putValue("Q1");
//Adding a sample value to "C2" cell as category data
worksheet.getCells().get("C2").putValue("Q2");
//Adding a sample value to "C3" cell as category data
worksheet.getCells().get("C3").putValue("Y1");
//Adding a sample value to "C4" cell as category data
worksheet.getCells().get("C4").putValue("Y2");
//Adding a chart to the worksheet
int chartIndex = worksheet.getCharts().add(ChartType.COLUMN, 5, 0, 15, 5);
//Accessing the instance of the newly added chart
Chart chart = worksheet.getCharts().get(chartIndex);
//Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4"
chart.getNSeries().add("A1:B4", true);
//Setting the data source for the category data of NSeries
chart.getNSeries().setCategoryData("C1:C4");
Series series = chart.getNSeries().get(1);
//Setting the values of the series.
series.setValues("=B1:B4");
//Changing the chart type of the series.
series.setType(ChartType.LINE);
//Setting marker properties.
series.setMarkerStyle(ChartMarkerType.CIRCLE);
series.setMarkerForegroundColorSetType(FormattingType.AUTOMATIC);
series.setMarkerForegroundColor(com.aspose.cells.Color.getBlack());
series.setMarkerBackgroundColorSetType(FormattingType.AUTOMATIC);
//Saving the Excel file
workbook.save("C:\\book1.xls");
Property Getters/Setters Summary | ||
---|---|---|
Area | getArea() | |
Represents the background area of Series object. | ||
int | getBar3DShapeType() | |
void | setBar3DShapeType(int) | |
Gets or sets the 3D shape type used with the 3-D bar or column chart. The value of the property is Bar3DShapeType integer constant. | ||
int | getBarShape() | |
void | setBarShape(int) | |
Gets or sets the 3D shape type used with the 3-D bar or column chart. The value of the property is Bar3DShapeType integer constant. | ||
Line | getBorder() | |
Represents border of Series object. | ||
int | getBubbleScale() | |
void | setBubbleScale(int) | |
Gets or sets the scale factor for bubbles in the specified chart group. It can be an integer value from 0 (zero) to 300, corresponding to a percentage of the default size. Applies only to bubble charts. | ||
int | getBubbleSizeRepresents() | |
void | setBubbleSizeRepresents(int) | |
Gets what the bubble size represents on a bubble chart. The value of the property is BubbleSizeRepresents integer constant. | ||
java.lang.String | getBubbleSizes() | |
void | setBubbleSizes(java.lang.String) | |
Gets or sets the bubble sizes values of the chart series. | ||
int | getCountOfDataValues() | |
Gets the number of the data values. | ||
DataLabels | getDataLabels() | |
Represents the DataLabels object for the specified ASeries. | ||
java.lang.String | getDisplayName() | |
Gets the series's name that displays on the chart graph. | ||
int | getDoughnutHoleSize() | |
void | setDoughnutHoleSize(int) | |
Returns or sets the size of the hole in a doughnut chart group. The hole size is expressed as a percentage of the chart size, between 10 and 90 percent. | ||
DropBars | getDownBars() | |
Returns a |
||
Line | getDropLines() | |
Returns a |
||
int | getExplosion() | |
void | setExplosion(int) | |
The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter. | ||
short | getFirstSliceAngle() | |
void | setFirstSliceAngle(short) | |
Gets or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts, 0 to 360. | ||
short | getGapWidth() | |
void | setGapWidth(short) | |
Returns or sets the space between bar or column clusters, as a percentage of the bar or column width. The value of this property must be between 0 and 500. | ||
boolean | getHas3DEffect() | |
void | setHas3DEffect(boolean) | |
True if the series has a three-dimensional appearance. Applies only to bubble charts. | ||
boolean | hasDropLines() | |
void | setHasDropLines(boolean) | |
True if the chart has drop lines. Applies only to line chart or area charts. | ||
boolean | hasHiLoLines() | |
void | setHasHiLoLines(boolean) | |
True if the line chart has high-low lines. Applies only to line charts. | ||
boolean | hasLeaderLines() | |
void | setHasLeaderLines(boolean) | |
True if the series has leader lines. | ||
boolean | hasRadarAxisLabels() | |
void | setHasRadarAxisLabels(boolean) | |
True if a radar chart has category axis labels. Applies only to radar charts. | ||
boolean | hasSeriesLines() | |
void | setHasSeriesLines(boolean) | |
True if a stacked column chart or bar chart has series lines or if a Pie of Pie chart or Bar of Pie chart has connector lines between the two sections. Applies only to stacked column charts, bar charts, Pie of Pie charts, or Bar of Pie charts. | ||
boolean | hasUpDownBars() | |
void | setHasUpDownBars(boolean) | |
True if a line chart has up and down bars. Applies only to line charts. | ||
Line | getHiLoLines() | |
Returns a HiLoLines object that represents the high-low lines for a series on a line chart. Applies only to line charts. | ||
boolean | isAutoSplit() | |
Indicates whether the threshold value is automatic. | ||
boolean | isColorVaried() | |
void | setColorVaried(boolean) | |
Represents if the color of points is varied. The chart must contain only one series. | ||
boolean | isVerticalValues() | |
Indicates whether the data source is vertical. | ||
SeriesLayoutProperties | getLayoutProperties() | |
Represents the properties of layout. | ||
Line | getLeaderLines() | |
Represents leader lines on a chart. Leader lines connect data labels to data points. This object isn’t a collection; there’s no object that represents a single leader line. | ||
LegendEntry | getLegendEntry() | |
Gets the legend entry according to this series. | ||
Marker | getMarker() | |
Gets the |
||
java.lang.String | getName() | |
void | setName(java.lang.String) | |
Gets or sets the name of the data series. | ||
short | getOverlap() | |
void | setOverlap(short) | |
Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. | ||
boolean | getPlotOnSecondAxis() | |
void | setPlotOnSecondAxis(boolean) | |
Indicates if this series is plotted on second value axis. | ||
ChartPointCollection | getPoints() | |
Gets the collection of points in a series in a chart. | ||
short | getSecondPlotSize() | |
void | setSecondPlotSize(short) | |
Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. | ||
Line | getSeriesLines() | |
Returns a SeriesLines object that represents the series lines for a stacked bar chart or a stacked column chart. Applies only to stacked bar and stacked column charts. | ||
boolean | getShadow() | |
void | setShadow(boolean) | |
True if the series has a shadow. | ||
ShapePropertyCollection | getShapeProperties() | |
Gets the object that holds the visual shape properties of the Series. | ||
boolean | getShowNegativeBubbles() | |
void | setShowNegativeBubbles(boolean) | |
True if negative bubbles are shown for the chart group. Valid only for bubble charts. | ||
int | getSizeRepresents() | |
void | setSizeRepresents(int) | |
Gets or sets what the bubble size represents on a bubble chart. The value of the property is BubbleSizeRepresents integer constant. | ||
boolean | getSmooth() | |
void | setSmooth(boolean) | |
Represents curve smoothing. True if curve smoothing is turned on for the line chart or scatter chart. Applies only to line and scatter connected by lines charts. | ||
int | getSplitType() | |
void | setSplitType(int) | |
Returns or sets a value that how to determine which data points are in the second pie or bar on a pie of pie or bar of pie chart. The value of the property is ChartSplitType integer constant. | ||
double | getSplitValue() | |
void | setSplitValue(double) | |
Returns or sets a value that shall be used to determine which data points are in the second pie or bar on a pie of pie or bar of pie chart. | ||
TrendlineCollection | getTrendLines() | |
Returns an object that represents a collection of all the trendlines for the series. | ||
int | getType() | |
void | setType(int) | |
Gets or sets a data series' type. The value of the property is ChartType integer constant. | ||
DropBars | getUpBars() | |
Returns an DropBars object that represents the up bars on a line chart. Applies only to line charts. | ||
java.lang.String | getValues() | |
void | setValues(java.lang.String) | |
Represents the data of the chart series. | ||
java.lang.String | getValuesFormatCode() | |
void | setValuesFormatCode(java.lang.String) | |
Represents format code of Values‘s NumberList. | ||
ErrorBar | getXErrorBar() | |
Represents X direction error bar of the series. | ||
java.lang.String | getXValues() | |
void | setXValues(java.lang.String) | |
Represents the x values of the chart series. | ||
ErrorBar | getYErrorBar() | |
Represents Y direction error bar of the series. |
Method Summary | ||
---|---|---|
void | move(int count) | |
Moves the series up or down. |
Property Getters/Setters Detail |
---|
getLayoutProperties | |
public SeriesLayoutProperties getLayoutProperties() |
Represents the properties of layout.
getPoints | |
public ChartPointCollection getPoints() |
Gets the collection of points in a series in a chart. When the chart is Pie of Pie or Bar of Pie, the last point is other point in first pie plot.
getArea | |
public Area getArea() |
Represents the background area of Series object.
getBorder | |
public Line getBorder() |
Represents border of Series object.
getName/setName | |
public java.lang.String getName() / public void setName(java.lang.String value) |
Gets or sets the name of the data series. Example:
//Reference name to a cell chart.getNSeries().get(0).setName("=A1"); //Set a string to name chart.getNSeries().get(0).setName("First Series");
getDisplayName | |
public java.lang.String getDisplayName() |
Gets the series's name that displays on the chart graph.
getCountOfDataValues | |
public int getCountOfDataValues() |
Gets the number of the data values.
isVerticalValues | |
public boolean isVerticalValues() |
Indicates whether the data source is vertical.
getValues/setValues | |
public java.lang.String getValues() / public void setValues(java.lang.String value) |
Represents the data of the chart series.
getValuesFormatCode/setValuesFormatCode | |
public java.lang.String getValuesFormatCode() / public void setValuesFormatCode(java.lang.String value) |
Represents format code of Values‘s NumberList.
getXValues/setXValues | |
public java.lang.String getXValues() / public void setXValues(java.lang.String value) |
Represents the x values of the chart series.
getBubbleSizes/setBubbleSizes | |
public java.lang.String getBubbleSizes() / public void setBubbleSizes(java.lang.String value) |
Gets or sets the bubble sizes values of the chart series.
getTrendLines | |
public TrendlineCollection getTrendLines() |
Returns an object that represents a collection of all the trendlines for the series.
getSmooth/setSmooth | |
public boolean getSmooth() / public void setSmooth(boolean value) |
Represents curve smoothing. True if curve smoothing is turned on for the line chart or scatter chart. Applies only to line and scatter connected by lines charts.
getShadow/setShadow | |
public boolean getShadow() / public void setShadow(boolean value) |
True if the series has a shadow.
getHas3DEffect/setHas3DEffect | |
public boolean getHas3DEffect() / public void setHas3DEffect(boolean value) |
True if the series has a three-dimensional appearance. Applies only to bubble charts.
getBar3DShapeType/setBar3DShapeType | |
public int getBar3DShapeType() / public void setBar3DShapeType(int value) |
Gets or sets the 3D shape type used with the 3-D bar or column chart. The value of the property is Bar3DShapeType integer constant.
getBarShape/setBarShape | |
public int getBarShape() / public void setBarShape(int value) |
Gets or sets the 3D shape type used with the 3-D bar or column chart. The value of the property is Bar3DShapeType integer constant. NOTE: This member is now obsolete. Instead, please use ASeries.Bar3DShapeType property. This property will be removed 12 months later since June 2010. Aspose apologizes for any inconvenience you may have experienced.
getDataLabels | |
public DataLabels getDataLabels() |
Represents the DataLabels object for the specified ASeries.
getType/setType | |
public int getType() / public void setType(int value) |
Gets or sets a data series' type. The value of the property is ChartType integer constant.
getMarker | |
public Marker getMarker() |
Gets the Marker .
getPlotOnSecondAxis/setPlotOnSecondAxis | |
public boolean getPlotOnSecondAxis() / public void setPlotOnSecondAxis(boolean value) |
Indicates if this series is plotted on second value axis.
getXErrorBar | |
public ErrorBar getXErrorBar() |
Represents X direction error bar of the series.
getYErrorBar | |
public ErrorBar getYErrorBar() |
Represents Y direction error bar of the series.
hasHiLoLines/setHasHiLoLines | |
public boolean hasHiLoLines() / public void setHasHiLoLines(boolean value) |
True if the line chart has high-low lines. Applies only to line charts.
getHiLoLines | |
public Line getHiLoLines() |
Returns a HiLoLines object that represents the high-low lines for a series on a line chart. Applies only to line charts.
hasSeriesLines/setHasSeriesLines | |
public boolean hasSeriesLines() / public void setHasSeriesLines(boolean value) |
True if a stacked column chart or bar chart has series lines or if a Pie of Pie chart or Bar of Pie chart has connector lines between the two sections. Applies only to stacked column charts, bar charts, Pie of Pie charts, or Bar of Pie charts.
getSeriesLines | |
public Line getSeriesLines() |
Returns a SeriesLines object that represents the series lines for a stacked bar chart or a stacked column chart. Applies only to stacked bar and stacked column charts.
hasDropLines/setHasDropLines | |
public boolean hasDropLines() / public void setHasDropLines(boolean value) |
True if the chart has drop lines. Applies only to line chart or area charts.
getDropLines | |
public Line getDropLines() |
Returns a Line object that represents the drop lines for a series on the line chart or area chart. Applies only to line chart or area charts.
hasUpDownBars/setHasUpDownBars | |
public boolean hasUpDownBars() / public void setHasUpDownBars(boolean value) |
True if a line chart has up and down bars. Applies only to line charts.
getUpBars | |
public DropBars getUpBars() |
Returns an DropBars object that represents the up bars on a line chart. Applies only to line charts.
getDownBars | |
public DropBars getDownBars() |
Returns a DropBars object that represents the down bars on a line chart. Applies only to line charts.
isColorVaried/setColorVaried | |
public boolean isColorVaried() / public void setColorVaried(boolean value) |
Represents if the color of points is varied. The chart must contain only one series.
getGapWidth/setGapWidth | |
public short getGapWidth() / public void setGapWidth(short value) |
Returns or sets the space between bar or column clusters, as a percentage of the bar or column width. The value of this property must be between 0 and 500.
getFirstSliceAngle/setFirstSliceAngle | |
public short getFirstSliceAngle() / public void setFirstSliceAngle(short value) |
Gets or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts, 0 to 360.
getOverlap/setOverlap | |
public short getOverlap() / public void setOverlap(short value) |
Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts.
getSecondPlotSize/setSecondPlotSize | |
public short getSecondPlotSize() / public void setSecondPlotSize(short value) |
Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200.
getSplitType/setSplitType | |
public int getSplitType() / public void setSplitType(int value) |
Returns or sets a value that how to determine which data points are in the second pie or bar on a pie of pie or bar of pie chart. The value of the property is ChartSplitType integer constant.
getSplitValue/setSplitValue | |
public double getSplitValue() / public void setSplitValue(double value) |
Returns or sets a value that shall be used to determine which data points are in the second pie or bar on a pie of pie or bar of pie chart.
isAutoSplit | |
public boolean isAutoSplit() |
Indicates whether the threshold value is automatic.
getBubbleScale/setBubbleScale | |
public int getBubbleScale() / public void setBubbleScale(int value) |
Gets or sets the scale factor for bubbles in the specified chart group. It can be an integer value from 0 (zero) to 300, corresponding to a percentage of the default size. Applies only to bubble charts.
getSizeRepresents/setSizeRepresents | |
public int getSizeRepresents() / public void setSizeRepresents(int value) |
Gets or sets what the bubble size represents on a bubble chart. The value of the property is BubbleSizeRepresents integer constant. BubbleSizeRepresents.SizeIsArea means the value BubbleSizes is the area of the bubble. BubbleSizeRepresents.SizeIsWidth means the valueBubbleSizes is the width of the bubble.
getShowNegativeBubbles/setShowNegativeBubbles | |
public boolean getShowNegativeBubbles() / public void setShowNegativeBubbles(boolean value) |
True if negative bubbles are shown for the chart group. Valid only for bubble charts.
getDoughnutHoleSize/setDoughnutHoleSize | |
public int getDoughnutHoleSize() / public void setDoughnutHoleSize(int value) |
Returns or sets the size of the hole in a doughnut chart group. The hole size is expressed as a percentage of the chart size, between 10 and 90 percent.
getExplosion/setExplosion | |
public int getExplosion() / public void setExplosion(int value) |
The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
hasRadarAxisLabels/setHasRadarAxisLabels | |
public boolean hasRadarAxisLabels() / public void setHasRadarAxisLabels(boolean value) |
True if a radar chart has category axis labels. Applies only to radar charts.
hasLeaderLines/setHasLeaderLines | |
public boolean hasLeaderLines() / public void setHasLeaderLines(boolean value) |
True if the series has leader lines.
getLeaderLines | |
public Line getLeaderLines() |
Represents leader lines on a chart. Leader lines connect data labels to data points. This object isn’t a collection; there’s no object that represents a single leader line.
getLegendEntry | |
public LegendEntry getLegendEntry() |
Gets the legend entry according to this series.
getShapeProperties | |
public ShapePropertyCollection getShapeProperties() |
Gets the object that holds the visual shape properties of the Series. - See Also:
ShapePropertyCollection
getBubbleSizeRepresents/setBubbleSizeRepresents | |
public int getBubbleSizeRepresents() / public void setBubbleSizeRepresents(int value) |
Gets what the bubble size represents on a bubble chart. The value of the property is BubbleSizeRepresents integer constant. the bubble size represents on a bubble chart. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Charts.Series.SizeRepresents property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.
Method Detail |
---|
move | |
public void move(int count) |
Moves the series up or down. - Parameters:
count
- The number of moving up or down. Move the series up if this is less than zero; Move the series down if this is greater than zero.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.