asposecells.api
Class Series

Encapsulates the object that represents a single data series in a chart.

Example:

# Instantiating a Workbook object
workbook = Workbook()
# Adding a new worksheet to the Excel object
sheetIndex = workbook.getWorksheets().add()
# Obtaining the reference of the newly added worksheet by passing its sheet index
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
chartIndex = worksheet.getCharts().add(ChartType.COLUMN, 5, 0, 15, 5)
# Accessing the instance of the newly added 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 = 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(Color.getBlack())
series.setMarkerBackgroundColorSetType(FormattingType.AUTOMATIC)
# Saving the Excel file
workbook.save("Book1.xls")

Property Getters/Setters Summary
methodgetArea()
           Represents the background area of Series object.
methodgetBar3DShapeType()
methodsetBar3DShapeType(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.
methodgetBarShape()
methodsetBarShape(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.
methodgetBorder()
           Represents border of Series object.
methodgetBubbleScale()
methodsetBubbleScale(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.
methodgetBubbleSizeRepresents()
methodsetBubbleSizeRepresents(value)
           Gets what the bubble size represents on a bubble chart. The value of the property is BubbleSizeRepresents integer constant.
methodgetBubbleSizes()
methodsetBubbleSizes(value)
           Gets or sets the bubble sizes values of the chart series.
methodgetCountOfDataValues()
           Gets the number of the data values.
methodgetDataLabels()
           Represents the DataLabels object for the specified ASeries.
methodgetDisplayName()
           Gets the series's name that displays on the chart graph.
methodgetDoughnutHoleSize()
methodsetDoughnutHoleSize(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.
methodgetDownBars()
           Returns a DropBars object that represents the down bars on a line chart. Applies only to line charts.
methodgetDropLines()
           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.
methodgetExplosion()
methodsetExplosion(value)
           The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
methodgetFirstSliceAngle()
methodsetFirstSliceAngle(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.
methodgetGapWidth()
methodsetGapWidth(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.
methodgetHas3DEffect()
methodsetHas3DEffect(value)
           True if the series has a three-dimensional appearance. Applies only to bubble charts.
methodhasDropLines()
methodsetHasDropLines(value)
           True if the chart has drop lines. Applies only to line chart or area charts.
methodhasHiLoLines()
methodsetHasHiLoLines(value)
           True if the line chart has high-low lines. Applies only to line charts.
methodhasLeaderLines()
methodsetHasLeaderLines(value)
           True if the series has leader lines.
methodhasRadarAxisLabels()
methodsetHasRadarAxisLabels(value)
           True if a radar chart has category axis labels. Applies only to radar charts.
methodhasSeriesLines()
methodsetHasSeriesLines(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.
methodhasUpDownBars()
methodsetHasUpDownBars(value)
           True if a line chart has up and down bars. Applies only to line charts.
methodgetHiLoLines()
           Returns a HiLoLines object that represents the high-low lines for a series on a line chart. Applies only to line charts.
methodisAutoSplit()
           Indicates whether the threshold value is automatic.
methodisColorVaried()
methodsetColorVaried(value)
           Represents if the color of points is varied. The chart must contain only one series.
methodisVerticalValues()
           Indicates whether the data source is vertical.
methodgetLayoutProperties()
           Reprsetns the properties of layout.
methodgetLeaderLines()
           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.
methodgetLegendEntry()
           Gets the legend entry according to this series.
methodgetLine()
           Represents border of Series object.
methodgetMarker()
           Gets the Marker.
methodgetMarkerBackgroundColor()
methodsetMarkerBackgroundColor(value)
           Represents the marker background color in a line chart, scatter chart, or radar chart.
methodgetMarkerBackgroundColorSetType()
methodsetMarkerBackgroundColorSetType(value)
           Gets or sets the marker background color set type. The value of the property is FormattingType integer constant.
methodgetMarkerForegroundColor()
methodsetMarkerForegroundColor(value)
           Represents the marker foreground color in a line chart, scatter chart, or radar chart.
methodgetMarkerForegroundColorSetType()
methodsetMarkerForegroundColorSetType(value)
           Gets or sets the marker foreground color set type. The value of the property is FormattingType integer constant.
methodgetMarkerSize()
methodsetMarkerSize(value)
           Represents the marker size in a line chart, scatter chart, or radar chart.
methodgetMarkerStyle()
methodsetMarkerStyle(value)
           Represents the marker style in a line chart, scatter chart, or radar chart. The value of the property is ChartMarkerType integer constant.
methodgetName()
methodsetName(value)
           Gets or sets the name of the data series.
methodgetOverlap()
methodsetOverlap(value)
           Specifies how bars and columns are positioned. Can be a value between ¨C 100 and 100. Applies only to 2-D bar and 2-D column charts.
methodgetPlotOnSecondAxis()
methodsetPlotOnSecondAxis(value)
           Indicates if this series is plotted on second value axis.
methodgetPoints()
           Gets the collection of points in a series in a chart.
methodgetSecondPlotSize()
methodsetSecondPlotSize(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.
methodgetSeriesLines()
           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.
methodgetShadow()
methodsetShadow(value)
           True if the series has a shadow.
methodgetShapeProperties()
           Gets the object that holds the visual shape properties of the Series.
methodgetShowNegativeBubbles()
methodsetShowNegativeBubbles(value)
           True if negative bubbles are shown for the chart group. Valid only for bubble charts.
methodgetSizeRepresents()
methodsetSizeRepresents(value)
           Gets or sets what the bubble size represents on a bubble chart. The value of the property is BubbleSizeRepresents integer constant.
methodgetSmooth()
methodsetSmooth(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.
methodgetSplitType()
methodsetSplitType(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.
methodgetSplitValue()
methodsetSplitValue(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.
methodgetTrendLines()
           Returns an object that represents a collection of all the trendlines for the series.
methodgetType()
methodsetType(value)
           Gets or sets a data series' type. The value of the property is ChartType integer constant.
methodgetUpBars()
           Returns an DropBars object that represents the up bars on a line chart. Applies only to line charts.
methodgetValues()
methodsetValues(value)
           Represents the data of the chart series.
methodgetValuesFormatCode()
methodsetValuesFormatCode(value)
           Represents format code of Values¡®s NumberList.
methodgetXErrorBar()
           Represents X direction error bar of the series.
methodgetXValues()
methodsetXValues(value)
           Represents the x values of the chart series.
methodgetYErrorBar()
           Represents Y direction error bar of the series.
 
Method Summary
methodmove(count)
           Moves the series up or down.
 

Property Getters/Setters Detail

getLayoutProperties : SeriesLayoutProperties 

SeriesLayoutProperties getLayoutProperties()
Reprsetns the properties of layout.

getPoints : ChartPointCollection 

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 : Area 

Area getArea()
Represents the background area of Series object.

getLine : Line 

Line getLine()
Represents border of Series object. NOTE: This member is now obsolete. Instead, please use Border property. This property will be removed 12 months later since Mar. 2012. Aspose apologizes for any inconvenience you may have experienced.

getBorder : Line 

Line getBorder()
Represents border of Series object.

getName/setName : String 

String getName() / setName(value)
Gets or sets the name of the data series.

Example:

workbook = Workbook()
# Get the first worksheet.
worksheet = workbook.getWorksheets().get(0)
# Adding a chart to the worksheet
chartIndex = worksheet.getCharts().add(ChartType.COLUMN, 5, 0, 15, 5)
# Accessing the instance of the newly added 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)
# Reference name to a cell
chart.getNSeries().get(0).setName("=A1")
# Set a string to name
chart.getNSeries().get(0).setName("First Series")

getDisplayName : String 

String getDisplayName()
Gets the series's name that displays on the chart graph.

getCountOfDataValues : int 

int getCountOfDataValues()
Gets the number of the data values.

isVerticalValues : boolean 

boolean isVerticalValues()
Indicates whether the data source is vertical.

getValues/setValues : String 

String getValues() / setValues(value)
Represents the data of the chart series.

getValuesFormatCode/setValuesFormatCode : String 

String getValuesFormatCode() / setValuesFormatCode(value)
Represents format code of Values¡®s NumberList.

getXValues/setXValues : String 

String getXValues() / setXValues(value)
Represents the x values of the chart series.

getBubbleSizes/setBubbleSizes : String 

String getBubbleSizes() / setBubbleSizes(value)
Gets or sets the bubble sizes values of the chart series.

getTrendLines : TrendlineCollection 

TrendlineCollection getTrendLines()
Returns an object that represents a collection of all the trendlines for the series.

getSmooth/setSmooth : boolean 

boolean getSmooth() / setSmooth(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 : boolean 

boolean getShadow() / setShadow(value)
True if the series has a shadow.

getHas3DEffect/setHas3DEffect : boolean 

boolean getHas3DEffect() / setHas3DEffect(value)
True if the series has a three-dimensional appearance. Applies only to bubble charts.

getBar3DShapeType/setBar3DShapeType : int 

int getBar3DShapeType() / setBar3DShapeType(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 : int 

int getBarShape() / setBarShape(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 : DataLabels 

DataLabels getDataLabels()
Represents the DataLabels object for the specified ASeries.

getType/setType : int 

int getType() / setType(value)
Gets or sets a data series' type. The value of the property is ChartType integer constant.

getMarker : Marker 

Marker getMarker()
Gets the Marker.

getMarkerStyle/setMarkerStyle : int 

int getMarkerStyle() / setMarkerStyle(value)
Represents the marker style in a line chart, scatter chart, or radar chart. The value of the property is ChartMarkerType integer constant.NOTE: This member is now obsolete. Instead, please use Marker.MarkerStyle property. This property will be removed 12 months later since August 2012. Aspose apologizes for any inconvenience you may have experienced.

getMarkerSize/setMarkerSize : int 

int getMarkerSize() / setMarkerSize(value)
Represents the marker size in a line chart, scatter chart, or radar chart. NOTE: This member is now obsolete. Instead, please use Marker.MarkerSize property. This property will be removed 12 months later since August 2012. Aspose apologizes for any inconvenience you may have experienced.

getMarkerForegroundColor/setMarkerForegroundColor : Color 

Color getMarkerForegroundColor() / setMarkerForegroundColor(value)
Represents the marker foreground color in a line chart, scatter chart, or radar chart. NOTE: This member is now obsolete. Instead, please use Marker.MarkerForegroundColor property. This property will be removed 12 months later since August 2012. Aspose apologizes for any inconvenience you may have experienced.

getMarkerForegroundColorSetType/setMarkerForegroundColorSetType : int 

int getMarkerForegroundColorSetType() / setMarkerForegroundColorSetType(value)
Gets or sets the marker foreground color set type. The value of the property is FormattingType integer constant.NOTE: This member is now obsolete. Instead, please use Marker.MarkerForegroundColorSetType property. This property will be removed 12 months later since August 2012. Aspose apologizes for any inconvenience you may have experienced. FormattingType.Automatic is same as ChartLineFormattingType.Automatic. FormattingType.None is same as ChartLineFormattingType.None. FormattingType.InnerCustom is same as ChartLineFormattingType.Solid.

getMarkerBackgroundColor/setMarkerBackgroundColor : Color 

Color getMarkerBackgroundColor() / setMarkerBackgroundColor(value)
Represents the marker background color in a line chart, scatter chart, or radar chart. NOTE: This member is now obsolete. Instead, please use Marker.MarkerBackgroundColor property. This property will be removed 12 months later since August 2012. Aspose apologizes for any inconvenience you may have experienced.

getMarkerBackgroundColorSetType/setMarkerBackgroundColorSetType : int 

int getMarkerBackgroundColorSetType() / setMarkerBackgroundColorSetType(value)
Gets or sets the marker background color set type. The value of the property is FormattingType integer constant.NOTE: This member is now obsolete. Instead, please use Marker.MarkerBackgroundColorSetType property. This property will be removed 12 months later since August 2012. Aspose apologizes for any inconvenience you may have experienced. FormattingType.Automatic is same as ChartLineFormattingType.Automatic. FormattingType.None is same as ChartLineFormattingType.None. FormattingType.InnerCustom is same as ChartLineFormattingType.Solid.

getPlotOnSecondAxis/setPlotOnSecondAxis : boolean 

boolean getPlotOnSecondAxis() / setPlotOnSecondAxis(value)
Indicates if this series is plotted on second value axis.

getXErrorBar : ErrorBar 

ErrorBar getXErrorBar()
Represents X direction error bar of the series.

getYErrorBar : ErrorBar 

ErrorBar getYErrorBar()
Represents Y direction error bar of the series.

hasHiLoLines/setHasHiLoLines : boolean 

boolean hasHiLoLines() / setHasHiLoLines(value)
True if the line chart has high-low lines. Applies only to line charts.

getHiLoLines : Line 

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 : boolean 

boolean hasSeriesLines() / setHasSeriesLines(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 : Line 

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 : boolean 

boolean hasDropLines() / setHasDropLines(value)
True if the chart has drop lines. Applies only to line chart or area charts.

getDropLines : Line 

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 : boolean 

boolean hasUpDownBars() / setHasUpDownBars(value)
True if a line chart has up and down bars. Applies only to line charts.

getUpBars : DropBars 

DropBars getUpBars()
Returns an DropBars object that represents the up bars on a line chart. Applies only to line charts.

getDownBars : DropBars 

DropBars getDownBars()
Returns a DropBars object that represents the down bars on a line chart. Applies only to line charts.

isColorVaried/setColorVaried : boolean 

boolean isColorVaried() / setColorVaried(value)
Represents if the color of points is varied. The chart must contain only one series.

getGapWidth/setGapWidth : int 

int getGapWidth() / setGapWidth(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 : int 

int getFirstSliceAngle() / setFirstSliceAngle(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 : int 

int getOverlap() / setOverlap(value)
Specifies how bars and columns are positioned. Can be a value between ¨C 100 and 100. Applies only to 2-D bar and 2-D column charts.

getSecondPlotSize/setSecondPlotSize : int 

int getSecondPlotSize() / setSecondPlotSize(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 : int 

int getSplitType() / setSplitType(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 : float 

float getSplitValue() / setSplitValue(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 : boolean 

boolean isAutoSplit()
Indicates whether the threshold value is automatic.

getBubbleScale/setBubbleScale : int 

int getBubbleScale() / setBubbleScale(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 : int 

int getSizeRepresents() / setSizeRepresents(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 value BubbleSizes is the width of the bubble.

getShowNegativeBubbles/setShowNegativeBubbles : boolean 

boolean getShowNegativeBubbles() / setShowNegativeBubbles(value)
True if negative bubbles are shown for the chart group. Valid only for bubble charts.

getDoughnutHoleSize/setDoughnutHoleSize : int 

int getDoughnutHoleSize() / setDoughnutHoleSize(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 : int 

int getExplosion() / setExplosion(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 : boolean 

boolean hasRadarAxisLabels() / setHasRadarAxisLabels(value)
True if a radar chart has category axis labels. Applies only to radar charts.

hasLeaderLines/setHasLeaderLines : boolean 

boolean hasLeaderLines() / setHasLeaderLines(value)
True if the series has leader lines.

getLeaderLines : Line 

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 : LegendEntry 

LegendEntry getLegendEntry()
Gets the legend entry according to this series.

getShapeProperties : ShapePropertyCollection 

ShapePropertyCollection getShapeProperties()
Gets the object that holds the visual shape properties of the Series.
See Also:
ShapePropertyCollection

getBubbleSizeRepresents/setBubbleSizeRepresents : int 

int getBubbleSizeRepresents() / setBubbleSizeRepresents(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

 move(count)
Moves the series up or down.
Parameters:
count: int - 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.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.