Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class NSeries

java.lang.Object
  extended by com.aspose.cells.NSeries

public class NSeries
extends java.lang.Object

Encapsulates a collection of ASeries objects.


Method Summary
 int add()
          Adds an empty ASeries object to a chart.
 int add(java.lang.String area, boolean isVertical)
          Adds the Series Collection to a chart.
 void changeSeriesOrder(int sourceIndex, int destIndex)
          Chanages the tow serieses order.It will cause the series index changed.
 ASeries get(int index)
          Gets Series object by index.
 java.lang.String getCategoryData()
          Gets the range of category Axis values.
 java.lang.String getSecondCategoryData()
          Gets the range of second category Axis values.
 void remove(int index)
          Removes a series from the collection
 void setCategoryData(java.lang.String categoryData)
          Sets the range of category Axis values.
 void setSecondCategoryData(java.lang.String categoryData)
          Sets the range of second category Axis values.
 int size()
          Gets number of series.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public int add()
Adds an empty ASeries object to a chart.

Returns:
Series object index.
Throws:
CellsException - if chart has been removed.

add

public int add(java.lang.String area,
               boolean isVertical)
Adds the Series Collection to a chart.

Parameters:
area - Specifies values from which to plot the data series; It can be:
  • a range of cells, such as, "D1:E10"
  • a defined NamedRange
  • a sequence of static values, such as, "{2,6,8,10}"
  • discontiguous cells, such as, "(A2,B3,D2)" or "A2,B3,D2"
  • several aforementioned data collections combined for several series, such as, "D1:E10,A2:C4"
isVertical - Specifies whether to plot the series from a range of cell values by row or by column.
Returns:
the last Series object index of the chart.
Throws:
CellsException - if NSeries has been removed.

get

public ASeries get(int index)
Gets Series object by index.

Parameters:
index - Aseries index.
Returns:
Series object.
Throws:
java.lang.IllegalArgumentException - if index is out of range.
CellsException - if chart has been removed.

changeSeriesOrder

public void changeSeriesOrder(int sourceIndex,
                              int destIndex)
Chanages the tow serieses order.It will cause the series index changed.

Parameters:
sourceIndex - series source index.
destIndex - series dest index.
Throws:
CellsException - if chart has been removed.
java.lang.IllegalArgumentException - if index is out of range.

size

public int size()
Gets number of series.

Returns:
number of series.
Throws:
CellsException - if chart has been removed.

setCategoryData

public void setCategoryData(java.lang.String categoryData)
Sets the range of category Axis values.

Parameters:
categoryData - the range of category Axis values. It can be:
  • a range of cells, such as, "D1:D10"
  • a defined NamedRange
  • a sequence of static values, such as, "{2,6,8,10}"
  • discontiguous cells, such as, "(A2,B3,D2)" or "A2,B3,D2"
Throws:
java.lang.IllegalArgumentException - if category data is invalid.
CellsException - if chart has been removed.

getCategoryData

public java.lang.String getCategoryData()
Gets the range of category Axis values.

Returns:
the range of category Axis values.
Throws:
CellsException - if chart has been removed.
See Also:
setCategoryData(String)

setSecondCategoryData

public void setSecondCategoryData(java.lang.String categoryData)
Sets the range of second category Axis values.

Parameters:
categoryData - the range of category Axis values.
Throws:
java.lang.IllegalArgumentException - if category data is invalid.
CellsException - if chart has been removed.
See Also:
setCategoryData(String)

getSecondCategoryData

public java.lang.String getSecondCategoryData()
Gets the range of second category Axis values.

Returns:
the range of category Axis values.
Throws:
CellsException - if chart has been removed.
See Also:
setCategoryData(String)

remove

public void remove(int index)
Removes a series from the collection

Parameters:
index - the index of series that will be removed