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 Excel 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()
          Represents 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.
 Legend getLegend()
          Gets the chart legend.
 NSeries getNSeries()
          Gets a NSeries object representing the data series in the chart.
 int getPerspective()
          Gets the perspective for the 3-D chart view.
 PlotArea getPlotArea()
          Gets the chart's plot area.
 int getRotation()
          Represents the rotation of the 3-D chart view (the rotation of the plot area around the series axis, in degrees)(between 0 and 360).
 SeriesAxis getSeriesAxis()
          Gets the chart's series axis.
 Title getTitle()
          Gets the chart's title.
 ValueAxis getValueAxis()
          Gets the chart's value axis.
 Walls getWalls()
          Gets a Walls object that represents the walls of a 3-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 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)
          Represents 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 setLegendShown(boolean isLegendShown)
          Sets whether the chart legend will be displayed.Default is true.
 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)
          Represents the rotation of the 3-D chart view (the rotation of the plot area around the series axis, in degrees)(between 0 and 360).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getChartArea

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

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

getPlotArea

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

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

getCategoryAxis

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

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

getValueAxis

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

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

getSeriesAxis

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

Returns:
SeriesAxis the chart's series axis.
Throws:
ExcelException - 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:
ExcelException - if charts has bean removed.

getLegend

public Legend getLegend()
Gets the chart legend.

Returns:
the chart legend.
Throws:
ExcelException - 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:
ExcelException - 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:
ExcelException - if charts has bean removed.

getTitle

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

Returns:
the chart's title.
Throws:
ExcelException - 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:
ExcelException - 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:
ExcelException - 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:
ExcelException - 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:
ExcelException - 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:
ExcelException - 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:
ExcelException - 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.
ExcelException - if charts has bean removed.

getElevation

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

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

setElevation

public void setElevation(int elevation)
Represents 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.
ExcelException - 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:
ExcelException - 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:
ExcelException - if charts has bean removed.
java.lang.IllegalArgumentException - if perspective is not between 0 and 100.

getRotation

public int getRotation()
Represents 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:
ExcelException - if charts has bean removed.

setRotation

public void setRotation(int rotation)
Represents 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.
ExcelException - 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:
ExcelException - 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:
ExcelException - 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:
ExcelException - 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;
ExcelException - if charts has bean removed.