Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.cells
Class Chart

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

public class Chart
extends java.lang.Object

Encapsulates the object that represents a single Workbook chart.


Method Summary
 CategoryAxis getCategoryAxis()
          Gets the chart's category axis.
 ChartArea getChartArea()
          Gets the chart area in the worksheet.
 ChartDataTable getChartDataTable()
          Gets chart data table.
 short getDepthPercent()
          Represents the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).
 int getElevation()
          Gets the elevation of the 3-D chart view, in degrees(between -90 and 90).
 int getFirstSliceAngle()
          Gets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical).
 Floor getFloor()
          Gets a Floor object that represents the walls of a 3-D chart.
 int getGapWidth()
          Gets the space between bar or column clusters, as a percentage of the bar or column width.
 short getHeightPercent()
          Gets the height of a 3-D chart as a percentage of the chart width(between 5 and 500 percent).
 Legend getLegend()
          Gets the chart legend.
 NSeries getNSeries()
          Gets a NSeries object representing the data series in the chart.
 int getOverlap()
          Sets the space between bar or column in a cluster, as a percentage of the bar or column width.
 PageSetup getPageSetup()
          Gets the page setup description in this chart.
 int getPerspective()
          Gets the perspective for the 3-D chart view.
 PlotArea getPlotArea()
          Gets the chart's plot area.
 int getRotation()
          Gets the rotation of the 3-D chart view (the rotation of the plot area around the series axis, in degrees)(between 0 and 360).
 CategoryAxis getSecondCategoryAxis()
          Gets the chart's second category axis.
 ValueAxis getSecondValueAxis()
          Gets the chart's second value axis.
 SeriesAxis getSeriesAxis()
          Gets the chart's series axis.
 TextBoxes getTextBoxes()
          Gets the TextBoxes collection.
 Title getTitle()
          Gets the chart's title.
 int getType()
          Gets a chart's type.
 ValueAxis getValueAxis()
          Gets the chart's value axis.
 Walls getWalls()
          Gets a Walls object that represents the walls of a 3-D chart.
 boolean isAutoScaling()
          True if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart.
 boolean isDataTableShown()
          Indicates whether the chart displays a data table.
 boolean isLegendShown()
          Indicates whether the chart legend will be displayed.
 boolean isRightAngleAxes()
          True if the chart axes are at right angles, independent of chart rotation or elevation.
 void setAutoScaling(boolean isAutoScaling)
          True if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart.
 void setDataTableShown(boolean isDataTableShown)
          Indicates whether the chart displays a data table.
 void setDepthPercent(int depthPercent)
          Represents the depth of a 3-D chart view as a percentage of the chart width (between 20 and 2000 percent).
 void setElevation(int elevation)
          Sets the elevation of the 3-D chart view, in degrees(between -90 and 90).
 void setFirstSliceAngle(int firstSliceAngle)
          Sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical).
 void setGapWidth(int gapWidth)
          Sets the space between bar or column clusters, as a percentage of the bar or column width.
 void setHeightPercent(int heightPercent)
          Sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).
 void setLegendShown(boolean isLegendShown)
          Sets whether the chart legend will be displayed.Default is true.
 void setOverlap(int overlap)
          Sets the space between bar or column in a cluster, as a percentage of the bar or column width.
 void setPerspective(int perspective)
          Gets the perspective for the 3-D chart view.
 void setRightAngleAxes(boolean isRightAngleAxes)
          True if the chart axes are at right angles, independent of chart rotation or elevation.
 void setRotation(int rotation)
          Sets the rotation of the 3-D chart view (the rotation of the plot area around the series axis, in degrees)(between 0 and 360).
 void setType(int type)
          Sets a chart's type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTextBoxes

public TextBoxes getTextBoxes()
Gets the TextBoxes collection.

Returns:
the TextBoxes collection.

getType

public int getType()
Gets a chart's type.

Returns:
a chart's type.

setType

public void setType(int type)
Sets a chart's type.

Parameters:
type - a chart's type.
Throws:
CellsException - if charts has bean removed.

getChartArea

public ChartArea getChartArea()
Gets the chart area in the worksheet.

Returns:
the chart area.
Throws:
CellsException - if charts has bean removed.

getPlotArea

public PlotArea getPlotArea()
Gets the chart's plot area.

Returns:
the chart's plot area.
Throws:
CellsException - if charts has bean removed.

getCategoryAxis

public CategoryAxis getCategoryAxis()
Gets the chart's category axis.

Returns:
CategoryAxis the chart's category axis.
Throws:
CellsException - if charts has bean removed.

getValueAxis

public ValueAxis getValueAxis()
Gets the chart's value axis.

Returns:
ValueAxis the chart's value axis.
Throws:
CellsException - if charts has bean removed.

getSecondCategoryAxis

public CategoryAxis getSecondCategoryAxis()
Gets the chart's second category axis.

Returns:
CategoryAxis the chart's second category axis.
Throws:
CellsException - if charts has bean removed.

getSecondValueAxis

public ValueAxis getSecondValueAxis()
Gets the chart's second value axis.

Returns:
ValueAxis the chart's second value axis.
Throws:
CellsException - if charts has bean removed.

getSeriesAxis

public SeriesAxis getSeriesAxis()
Gets the chart's series axis.

Returns:
SeriesAxis the chart's series axis.
Throws:
CellsException - if charts has bean removed.

getNSeries

public NSeries getNSeries()
Gets a NSeries object representing the data series in the chart.

Returns:
a NSeries object.
Throws:
CellsException - if charts has bean removed.

getLegend

public Legend getLegend()
Gets the chart legend.

Returns:
the chart legend.
Throws:
CellsException - if charts has bean removed.

isLegendShown

public boolean isLegendShown()
Indicates whether the chart legend will be displayed. Default is true.

Returns:
whether the chart legend will be displayed.
Throws:
CellsException - if charts has bean removed.

setLegendShown

public void setLegendShown(boolean isLegendShown)
Sets whether the chart legend will be displayed.Default is true.

Parameters:
isLegendShown - whether the chart legend will be displayed.
Throws:
CellsException - if charts has bean removed.

getTitle

public Title getTitle()
Gets the chart's title.

Returns:
the chart's title.
Throws:
CellsException - if charts has bean removed.

getFloor

public Floor getFloor()
Gets a Floor object that represents the walls of a 3-D chart.

Returns:
a Floor object.
Throws:
CellsException - if charts has bean removed.

getWalls

public Walls getWalls()
Gets a Walls object that represents the walls of a 3-D chart.

Returns:
a Walls object.
Throws:
CellsException - if charts has bean removed.

isDataTableShown

public boolean isDataTableShown()
Indicates whether the chart displays a data table. Default is false.

Returns:
whether the chart displays a data table.
Throws:
CellsException - if charts has bean removed.

setDataTableShown

public void setDataTableShown(boolean isDataTableShown)
Indicates whether the chart displays a data table. Default is false.

Parameters:
isDataTableShown - whether the chart displays a data table.
Throws:
CellsException - if charts has bean removed.

getChartDataTable

public ChartDataTable getChartDataTable()
Gets chart data table. Please enable data table is shown first,or data table is ignored.

Returns:
chart data table.
Throws:
CellsException - if charts has bean removed.

getDepthPercent

public short getDepthPercent()
Represents the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).

Returns:
the depth of a 3-D chart as a percentage of the chart width.
Throws:
CellsException - if charts has bean removed.

setDepthPercent

public void setDepthPercent(int depthPercent)
Represents the depth of a 3-D chart view as a percentage of the chart width (between 20 and 2000 percent).

Parameters:
depthPercent - the depth of a 3-D chart as a percentage of the chart width.
Throws:
java.lang.IllegalArgumentException - if depthPercent is not between 20 and 2000.
CellsException - if charts has bean removed.

getHeightPercent

public short getHeightPercent()
Gets the height of a 3-D chart as a percentage of the chart width(between 5 and 500 percent).

Returns:
the height of a 3-D chart as a percentage of the chart width.
Throws:
CellsException - if charts has bean removed.

setHeightPercent

public void setHeightPercent(int heightPercent)
Sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).

Parameters:
heightPercent - the height of a 3-D chart as a percentage of the chart width.
Throws:
java.lang.IllegalArgumentException - if heightPercent is not between 5 and 500.
CellsException - if charts has bean removed.

getElevation

public int getElevation()
Gets the elevation of the 3-D chart view, in degrees(between -90 and 90).

Returns:
the elevation of the 3-D chart view.
Throws:
CellsException - if charts has bean removed.

setElevation

public void setElevation(int elevation)
Sets the elevation of the 3-D chart view, in degrees(between -90 and 90).

Parameters:
elevation - the elevation of the 3-D chart view.
Throws:
java.lang.IllegalArgumentException - if elevation is not between -90 and 90.
CellsException - if charts has bean removed.

getPerspective

public int getPerspective()
Gets the perspective for the 3-D chart view. Must be between 0 and 100.

Returns:
the perspective for the 3-D chart view
Throws:
CellsException - if charts has bean removed.

setPerspective

public void setPerspective(int perspective)
Gets the perspective for the 3-D chart view. Must be between 0 and 100.

Parameters:
perspective - the perspective for the 3-D chart view
Throws:
CellsException - if charts has bean removed.
java.lang.IllegalArgumentException - if perspective is not between 0 and 100.

getRotation

public int getRotation()
Gets the rotation of the 3-D chart view (the rotation of the plot area around the series axis, in degrees)(between 0 and 360).

Returns:
the rotation of the 3-D chart view.
Throws:
CellsException - if charts has bean removed.

setRotation

public void setRotation(int rotation)
Sets the rotation of the 3-D chart view (the rotation of the plot area around the series axis, in degrees)(between 0 and 360).

Parameters:
rotation - the rotation of the 3-D chart view.
Throws:
java.lang.IllegalArgumentException - if rotation is not between 0 and 360.
CellsException - if charts has bean removed.

isRightAngleAxes

public boolean isRightAngleAxes()
True if the chart axes are at right angles, independent of chart rotation or elevation. Applies only to 3-D line, column, and bar charts.

Returns:
whether the chart axes are at right angles.
Throws:
CellsException - if charts has bean removed.

setRightAngleAxes

public void setRightAngleAxes(boolean isRightAngleAxes)
True if the chart axes are at right angles, independent of chart rotation or elevation. Applies only to 3-D line, column, and bar charts. If this property is True, the Perspective property is ignored.

Parameters:
isRightAngleAxes - whether the chart axes are at right angles.
Throws:
CellsException - if charts has bean removed.

isAutoScaling

public boolean isAutoScaling()
True if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart.

Returns:
whether char auto 3D scales.
Throws:
CellsException - if charts has bean removed.

setAutoScaling

public void setAutoScaling(boolean isAutoScaling)
True if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart. Only effects when isRightAngleAxes is true.

Parameters:
isAutoScaling - whether the chart auto scales.
Throws:
CellsException - if charts has bean removed.

getFirstSliceAngle

public int getFirstSliceAngle()
Gets 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.

Returns:
the angle of the first pie-chart or doughnut-chart slice.
Throws:
CellsException - if charts has bean removed.

setFirstSliceAngle

public void setFirstSliceAngle(int firstSliceAngle)
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.

Parameters:
firstSliceAngle - the angle of the first pie-chart or doughnut-chart slice.
Throws:
java.lang.IllegalArgumentException - if firstSliceAngle is not between 0 and 360;
CellsException - if charts has bean removed.

getPageSetup

public PageSetup getPageSetup()
Gets the page setup description in this chart.

Returns:
the page setup description in this chart.
Throws:
CellsException - if charts has bean removed.

getGapWidth

public int getGapWidth()
Gets 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.

Returns:
the space between bar or column clusters

setGapWidth

public void setGapWidth(int gapWidth)
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.

Parameters:
gapWidth - the space between bar or column clusters
Throws:
java.lang.IllegalArgumentException - if gapWidth is not between 0 and 500;

getOverlap

public int getOverlap()
Sets the space between bar or column in a cluster, as a percentage of the bar or column width. The value of this property must be between 0 and 500.

Returns:
the space between bar or column in a cluster.

setOverlap

public void setOverlap(int overlap)
Sets the space between bar or column in a cluster, as a percentage of the bar or column width. The value of this property must be between -100 and 100.

Parameters:
overlap - the space between bar or column in a cluster.