Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class Charts

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

public class Charts
extends java.lang.Object

Encapsulates a collection of Chart objects.


Method Summary
 int add(int chartType, int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn)
          Deprecated. replaced by addChart(int, int, int, int, int)
 int add(int chartType, int row, int column, int left, int top, int width, int height)
          Deprecated. replaced by addChart(int, int, int, int, int, int, int)
 Chart addChart(int chartType, int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn)
          Adds a chart to the collection.
 Chart addChart(int chartType, int row, int column, int left, int top, int width, int height)
          Adds a chart to the collection.
 Chart getChart(int index)
          Gets chart object by index.
 boolean remove(Chart chart)
          Remove a chart from the collection
 boolean remove(int index)
          Remove a chart from the collection
 int size()
          Gets number of charts in the worksheet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public int add(int chartType,
               int upperLeftRow,
               int upperLeftColumn,
               int lowerRightRow,
               int lowerRightColumn)
Deprecated. replaced by addChart(int, int, int, int, int)

Adds a chart to the collection.

Parameters:
chartType - chart type.
upperLeftRow - upper left row index.
upperLeftColumn - upper left column index.
lowerRightRow - lower right row index.
lowerRightColumn - lower right column index.
Returns:
Chart object index.
Throws:
CellsException - if the chart collection has been removed from the worksheet.
See Also:
ChartType

add

public int add(int chartType,
               int row,
               int column,
               int left,
               int top,
               int width,
               int height)
Deprecated. replaced by addChart(int, int, int, int, int, int, int)

Adds a chart to the collection.

Parameters:
chartType - chart type.
row - row index.
column - column index.
left - the horizontal offset from its upper left corner column, in unit of pixel.
top - the vertical offset from its upper left corner row, in unit of pixel.
width - height of chart, in unit of pixel.
height - width of chart, in unit of pixel.
Returns:
Chart Object index.
Throws:
java.lang.IllegalArgumentException - if row or column index is out of range.
CellsException - if the chart collection has been removed from the worksheet.

addChart

public Chart addChart(int chartType,
                      int upperLeftRow,
                      int upperLeftColumn,
                      int lowerRightRow,
                      int lowerRightColumn)
Adds a chart to the collection.

Parameters:
chartType - chart type.
upperLeftRow - upper left row index.
upperLeftColumn - upper left column index.
lowerRightRow - lower right row index.
lowerRightColumn - lower right column index.
Returns:
Chart object.
Throws:
CellsException - if the chart collection has been removed from the worksheet.
See Also:
ChartType

addChart

public Chart addChart(int chartType,
                      int row,
                      int column,
                      int left,
                      int top,
                      int width,
                      int height)
Adds a chart to the collection.

Parameters:
chartType - chart type.
row - row index.
column - column index.
left - the horizontal offset from its upper left corner column, in unit of pixel.
top - the vertical offset from its upper left corner row, in unit of pixel.
width - height of chart, in unit of pixel.
height - width of chart, in unit of pixel.
Returns:
Chart Object.
Throws:
java.lang.IllegalArgumentException - if row or column index is out of range.
CellsException - if the chart collection has been removed from the worksheet.

getChart

public Chart getChart(int index)
Gets chart object by index.

Parameters:
index - chart object index
Returns:
chart object.
Throws:
java.lang.IllegalArgumentException - if index is out of range.
CellsException - if the chart collection has been removed from the worksheet.

remove

public boolean remove(Chart chart)
Remove a chart from the collection

Parameters:
chart - Chart to be removed
Returns:
true if the Chart exists and be removed.

remove

public boolean remove(int index)
Remove a chart from the collection

Parameters:
index - Chart index to be removed
Returns:
true if the Chart exists and be removed.

size

public int size()
Gets number of charts in the worksheet.

Returns:
number of charts in the worksheet.
Throws:
CellsException - if the chart collection has been removed from the worksheet.