Interface IChart
public interface IChart
Represents a chart object in a worksheet.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a chart at the specified location on the chart.addChartInPixel(ChartType chartType, double left, double top, double width, double height) Creates a chart at the specified location on the chart.addConnector(ConnectorType type, double beginX, double beginY, double endX, double endY) Creates a connector.addConnectorInPixel(ConnectorType type, double beginX, double beginY, double endX, double endY) Creates a connector.addPicture(InputStream stream, ImageType type, double left, double top, double width, double height) Creates a picture from an existing stream.addPicture(String filename, double left, double top, double width, double height) Creates a picture from an existing file.addPictureInPixel(InputStream stream, ImageType type, double left, double top, double width, double height) Creates a picture from an existing stream.addPictureInPixel(String filename, double left, double top, double width, double height) Creates a picture from an existing file.addShape(AutoShapeType type, double left, double top, double width, double height) Returns theIShapeobject that represents the new AutoShape in the chart.addShapeInPixel(AutoShapeType type, double left, double top, double width, double height) Returns theIShapeobject that represents the new AutoShape in the chart.voiddelete()Deletes the object.Returns theIChartGroupobject that represents the area chart groupon a 3-D chart.Returns an object that represents a collection of the area chart groupsIChartGroups, on a 2D chart.booleanGets the scaling (True to scale a 3-D chart so that it's closer in size to the equivalent 2-D chart.getAxes()Returns an object that represents a collection of the axes on the chart.Returns theIWallobject that allows the user to individually formatthe back wall of a 3-D chart.Returns theIChartGroupobject that represents the bar chart group ona 3-D chart.Returns an object that represents a collection of the bar chart groupsIChartGroups, on a 2D chart.Returns the shape used with the 3-D bar or column chart.Returns theIChartAreaobject that represents the complete chart areafor the chart.Returns an object that represents a collection of all the chart groups in the chartIChartGroups.Returns theIChartTitleobject that represents the title of thespecified chart.Returns the chart type.Returns theIChartGroupobject that represents the column chart groupon a 3-D chart.Returns an object that represents a collection of the column chart groupsIChartGroups, on a 2D chart.Returns theIDataTableobject that represents the chart data table.intReturns the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).Returns the way that blank cells are plotted on a chart.booleanGets whether show #N/A as empty cell.Returns an object that represents a collection of the doughnut chart groupsIChartGroups, on a 2D chart.doubleReturns the elevation of the 3-D chart view in degrees.getFloor()Returns theIFloorobject that represents the floor of the 3-D chart.intReturns the distance between the data series in a 3-D chart as a percentage of the marker width.booleanGets a value indicating whether the chart displays a data table.booleanGets whether the chart has a legend.booleanGets whether the axis or chart has a visible title.intReturns the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).Returns theILegendobject that represents the legend for the chart.Returns theIChartGroupobject that represents the line chart groupon a 3-D chart.Returns an object that represents a collection of the line chart groupsIChartGroups, on a 2D chart.getName()Returns the name of the object.Returns the parentIShapeof the chart.intReturns the perspective for the 3-D chart view.Returns theIChartGroupobject that represents the pie chart group ona 3-D chart.Returns an object that represents a collection of the pie chart groupsIChartGroups, on a 2D chart.Returns theIPivotOptionsobject that represents theoptions whether to display pivot chart buttons.Returns theIPivotTableobject that represents the thePivotTable report containing the upper-left corner of the specified range, or the PivotTable report associated with the PivotChart report.Returns theIPlotAreaobject that represents the plot area of achart.booleanGets whether visible cells are plotted.Returns an object that represents a collection of the radar chart groupsIChartGroups, on a 2D chart.booleanGets whether the chart axes are at right angles, independent of chart rotation or elevation.doubleReturns the rotation of the 3-D chart view (the rotation of the plot area around the z-axis in degrees).Returns an object that represents a collection of all the series in the chart.Returns all drawing shapes in this chart.booleanGets whether to show the data labels when the value is greater than the maximum value on the value axis.Returns theIWallobject that allows the user to individually formatthe side wall of a 3-D chart.Returns theIChartGroupobject that represents the surface chartgroup of a 3-D chart.getWalls()Returns theIWallobject that represents the walls of the 3-D chart.Returns an object that represents a collection of the scatter chart groupsIChartGroups, on a 2D chart.voidsetAutoScaling(boolean value) Sets the scaling (True to scale a 3-D chart so that it's closer in size to the equivalent 2-D chart.voidsetBarShape(BarShape value) Sets the shape used with the 3-D bar or column chart.voidsetChartType(ChartType value) Sets the chart type.voidsetDepthPercent(int value) Sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).voidSets the way that blank cells are plotted on a chart.voidsetDisplayNaAsBlank(boolean value) Sets whether show #N/A as empty cell.voidsetElevation(double value) Sets the elevation of the 3-D chart view in degrees.voidsetGapDepth(int value) Sets the distance between the data series in a 3-D chart as a percentage of the marker width.voidsetHasDataTable(boolean value) Sets a value indicating whether the chart displays a data table.voidsetHasLegend(boolean value) Sets whether the chart has a legend.voidsetHasTitle(boolean value) Sets whether the axis or chart has a visible title.voidsetHeightPercent(int value) Sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).voidsetPerspective(int value) Sets the perspective for the 3-D chart view.voidsetPlotVisibleOnly(boolean value) Sets whether visible cells are plotted.voidsetRightAngleAxes(boolean value) Sets whether the chart axes are at right angles, independent of chart rotation or elevation.voidsetRotation(double value) Sets the rotation of the 3-D chart view (the rotation of the plot area around the z-axis in degrees).voidsetShowDataLabelsOverMaximum(boolean value) Sets whether to show the data labels when the value is greater than the maximum value on the value axis.voidsetSourceData(IRange source) Sets the source data range for the chart.voidsetSourceData(IRange source, RowCol plotBy) Sets the source data range for the chart.
-
Method Details
-
getName
String getName()Returns the name of the object. -
getParent
IShape getParent()Returns the parentIShapeof the chart. -
getChartType
ChartType getChartType()Returns the chart type. -
setChartType
Sets the chart type. -
getSeriesCollection
ISeriesCollection getSeriesCollection()Returns an object that represents a collection of all the series in the chart. -
getAxes
IAxes getAxes()Returns an object that represents a collection of the axes on the chart. -
getChartArea
IChartArea getChartArea()Returns theIChartAreaobject that represents the complete chart areafor the chart. -
getChartTitle
IChartTitle getChartTitle()Returns theIChartTitleobject that represents the title of thespecified chart. -
getPlotArea
IPlotArea getPlotArea()Returns theIPlotAreaobject that represents the plot area of achart. -
getLegend
ILegend getLegend()Returns theILegendobject that represents the legend for the chart. -
getDataTable
IDataTable getDataTable()Returns theIDataTableobject that represents the chart data table. -
getFloor
IFloor getFloor()Returns theIFloorobject that represents the floor of the 3-D chart. -
getWalls
IWall getWalls()Returns theIWallobject that represents the walls of the 3-D chart. -
getSideWall
IWall getSideWall()Returns theIWallobject that allows the user to individually formatthe side wall of a 3-D chart. -
getBackWall
IWall getBackWall()Returns theIWallobject that allows the user to individually formatthe back wall of a 3-D chart. -
getAutoScaling
boolean getAutoScaling()Gets the scaling (True to scale a 3-D chart so that it's closer in size to the equivalent 2-D chart. The RightAngleAxes property must be True). -
setAutoScaling
void setAutoScaling(boolean value) Sets the scaling (True to scale a 3-D chart so that it's closer in size to the equivalent 2-D chart. The RightAngleAxes property must be True). -
getBarShape
BarShape getBarShape()Returns the shape used with the 3-D bar or column chart. -
setBarShape
Sets the shape used with the 3-D bar or column chart. -
getPlotVisibleOnly
boolean getPlotVisibleOnly()Gets whether visible cells are plotted. True if only visible cells are plotted. False if both visible and hidden cells are plotted. -
setPlotVisibleOnly
void setPlotVisibleOnly(boolean value) Sets whether visible cells are plotted. True if only visible cells are plotted. False if both visible and hidden cells are plotted. -
getDisplayNaAsBlank
boolean getDisplayNaAsBlank()Gets whether show #N/A as empty cell. IF true, #N/A is showed as empty cell. -
setDisplayNaAsBlank
void setDisplayNaAsBlank(boolean value) Sets whether show #N/A as empty cell. IF true, #N/A is showed as empty cell. -
getDepthPercent
int getDepthPercent()Returns the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent). -
setDepthPercent
void setDepthPercent(int value) Sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent). -
getDisplayBlanksAs
DisplayBlanksAs getDisplayBlanksAs()Returns the way that blank cells are plotted on a chart. Can be one of the following:DisplayBlanksAsconstants: NotPlotted, Interpolated, orZero. -
setDisplayBlanksAs
Sets the way that blank cells are plotted on a chart. Can be one of the following:DisplayBlanksAsconstants: NotPlotted, Interpolated, orZero. -
getElevation
double getElevation()Returns the elevation of the 3-D chart view in degrees. -
setElevation
void setElevation(double value) Sets the elevation of the 3-D chart view in degrees. -
getGapDepth
int getGapDepth()Returns the distance between the data series in a 3-D chart as a percentage of the marker width. The value of this property must be between 0 and 500. -
setGapDepth
void setGapDepth(int value) Sets the distance between the data series in a 3-D chart as a percentage of the marker width. The value of this property must be between 0 and 500. -
getHasLegend
boolean getHasLegend()Gets whether the chart has a legend. -
setHasLegend
void setHasLegend(boolean value) Sets whether the chart has a legend. -
getHasDataTable
boolean getHasDataTable()Gets a value indicating whether the chart displays a data table. -
setHasDataTable
void setHasDataTable(boolean value) Sets a value indicating whether the chart displays a data table. -
getHasTitle
boolean getHasTitle()Gets whether the axis or chart has a visible title. -
setHasTitle
void setHasTitle(boolean value) Sets whether the axis or chart has a visible title. -
getHeightPercent
int getHeightPercent()Returns the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent). -
setHeightPercent
void setHeightPercent(int value) Sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent). -
getPerspective
int getPerspective()Returns the perspective for the 3-D chart view. Must be between 0 and 100. This property is ignored if the RightAngleAxes property is True. -
setPerspective
void setPerspective(int value) Sets the perspective for the 3-D chart view. Must be between 0 and 100. This property is ignored if the RightAngleAxes property is True. -
getRightAngleAxes
boolean getRightAngleAxes()Gets whether the chart axes are at right angles, independent of chart rotation or elevation. Applies only to 3-D line, column, and bar charts. -
setRightAngleAxes
void setRightAngleAxes(boolean value) Sets whether the chart axes are at right angles, independent of chart rotation or elevation. Applies only to 3-D line, column, and bar charts. -
getRotation
double getRotation()Returns the rotation of the 3-D chart view (the rotation of the plot area around the z-axis in degrees). The value of this property must be from 0 to 360, except for 3-D bar charts, where the value must be from 0 to 44. The default value is 20. Applies only to 3-D charts. -
setRotation
void setRotation(double value) Sets the rotation of the 3-D chart view (the rotation of the plot area around the z-axis in degrees). The value of this property must be from 0 to 360, except for 3-D bar charts, where the value must be from 0 to 44. The default value is 20. Applies only to 3-D charts. -
getShowDataLabelsOverMaximum
boolean getShowDataLabelsOverMaximum()Gets whether to show the data labels when the value is greater than the maximum value on the value axis. -
setShowDataLabelsOverMaximum
void setShowDataLabelsOverMaximum(boolean value) Sets whether to show the data labels when the value is greater than the maximum value on the value axis. -
getShapes
Returns all drawing shapes in this chart. -
getPivotTable
IPivotTable getPivotTable()Returns theIPivotTableobject that represents the thePivotTable report containing the upper-left corner of the specified range, or the PivotTable report associated with the PivotChart report. -
getPivotOptions
IPivotOptions getPivotOptions()Returns theIPivotOptionsobject that represents theoptions whether to display pivot chart buttons. -
getArea3DGroup
IChartGroup getArea3DGroup()Returns theIChartGroupobject that represents the area chart groupon a 3-D chart. -
getBar3DGroup
IChartGroup getBar3DGroup()Returns theIChartGroupobject that represents the bar chart group ona 3-D chart. -
getColumn3DGroup
IChartGroup getColumn3DGroup()Returns theIChartGroupobject that represents the column chart groupon a 3-D chart. -
getLine3DGroup
IChartGroup getLine3DGroup()Returns theIChartGroupobject that represents the line chart groupon a 3-D chart. -
getPie3DGroup
IChartGroup getPie3DGroup()Returns theIChartGroupobject that represents the pie chart group ona 3-D chart. -
getSurfaceGroup
IChartGroup getSurfaceGroup()Returns theIChartGroupobject that represents the surface chartgroup of a 3-D chart. -
getAreaGroups
IChartGroups getAreaGroups()Returns an object that represents a collection of the area chart groupsIChartGroups, on a 2D chart. -
getBarGroups
IChartGroups getBarGroups()Returns an object that represents a collection of the bar chart groupsIChartGroups, on a 2D chart. -
getColumnGroups
IChartGroups getColumnGroups()Returns an object that represents a collection of the column chart groupsIChartGroups, on a 2D chart. -
getDoughnutGroups
IChartGroups getDoughnutGroups()Returns an object that represents a collection of the doughnut chart groupsIChartGroups, on a 2D chart. -
getLineGroups
IChartGroups getLineGroups()Returns an object that represents a collection of the line chart groupsIChartGroups, on a 2D chart. -
getPieGroups
IChartGroups getPieGroups()Returns an object that represents a collection of the pie chart groupsIChartGroups, on a 2D chart. -
getRadarGroups
IChartGroups getRadarGroups()Returns an object that represents a collection of the radar chart groupsIChartGroups, on a 2D chart. -
getXYGroups
IChartGroups getXYGroups()Returns an object that represents a collection of the scatter chart groupsIChartGroups, on a 2D chart. -
getChartGroups
IChartGroups getChartGroups()Returns an object that represents a collection of all the chart groups in the chartIChartGroups. The returned collection includes every type of group. -
addShape
Returns theIShapeobject that represents the new AutoShape in the chart.- Parameters:
type- Specifies the type of AutoShape to create.left- The distance from the left edge of the AutoShape's boundary box to the left edge of the chart area, in points.top- The distance from the top edge of the AutoShape's boundary box to the top edge of the chart area, in points.width- The width of the AutoShape's boundary box, in points.height- The height of the AutoShape's boundary box, in points.- Returns:
- The
IShapeThe object.
-
addChart
Creates a chart at the specified location on the chart.- Parameters:
chartType- The chart typeleft- The distance from the left edge of the chart to the left edge of the chart area, in points.top- The distance from the top edge of the chart to the top edge of the chart area, in points.width- The width, in points, of the objectheight- The height, in points, of the object- Returns:
- The
IShapeThe object.
-
addConnector
Creates a connector. Returns theIShapeobject that represents the new connector.- Parameters:
type- The connector type to add.beginX- The horizontal position of the connector's starting point relative to the upper-left corner of the chart area, in points.beginY- The vertical position of the connector's starting point relative to the upper-left corner of the chart area, in points.endX- The horizontal position of the connector's end point relative to the upper-left corner of the chart area, in points.endY- The veritcal position of the connector's end point relative to the upper-left corner of the chart area, in points.- Returns:
- The
IShapeobject.
-
addPicture
IShape addPicture(String filename, double left, double top, double width, double height) throws IOException Creates a picture from an existing file. Returns theIShapeobject that represents the new picture.- Parameters:
filename- The file from which the object is to be created.left- The distance from the left edge of the picture to the left edge of the chart area, in points.top- The distance from the top edge of the picture to the top edge of the chart area, in points.width- The width of the picture, in points.height- The height of the picture, in points.- Returns:
- The
IShapeThe object. - Throws:
IOException
-
addPicture
IShape addPicture(InputStream stream, ImageType type, double left, double top, double width, double height) throws IOException Creates a picture from an existing stream. Returns theIShapeobject that represents the new picture.- Parameters:
stream- The stream from which the object is to be created.type- Specifies the type of picture to create.left- The distance from the left edge of the picture to the left edge of the chart area, in points.top- The distance from the top edge of the picture to the top edge of the chart area, in points.width- The width of the picture, in points.height- The height of the picture, in points.- Returns:
- The
IShapeThe object. - Throws:
IOException
-
addShapeInPixel
Returns theIShapeobject that represents the new AutoShape in the chart.- Parameters:
type- Specifies the type of AutoShape to create.left- The distance from the left edge of the AutoShape's boundary box to the left edge of the chart area, in pixels.top- The distance from the top edge of the AutoShape's boundary box to the top edge of the chart area, in pixels.width- The width of the AutoShape's boundary box, in pixels.height- The height of the AutoShape's boundary box, in pixels.- Returns:
- The
IShapeThe object.
-
addChartInPixel
Creates a chart at the specified location on the chart.- Parameters:
chartType- The chart typeleft- The distance from the left edge of the chart to the left edge of the chart area, in pixels.top- The distance from the top edge of the chart to the top edge of the chart area, in pixels.width- The width, in pixels, of the objectheight- The height, in pixels, of the object- Returns:
- The
IShapeThe object.
-
addConnectorInPixel
IShape addConnectorInPixel(ConnectorType type, double beginX, double beginY, double endX, double endY) Creates a connector. Returns theIShapeobject that represents the new connector.- Parameters:
type- The connector type to add.beginX- The horizontal position of the connector's starting point relative to the upper-left corner of the chart area, in pixels.beginY- The vertical position of the connector's starting point relative to the upper-left corner of the chart area, in pixels.endX- The horizontal position of the connector's end point relative to the upper-left corner of the chart area, in pixels.endY- The veritcal position of the connector's end point relative to the upper-left corner of the chart area, in pixels.- Returns:
- The
IShapeobject.
-
addPictureInPixel
IShape addPictureInPixel(String filename, double left, double top, double width, double height) throws IOException Creates a picture from an existing file. Returns theIShapeobject that represents the new picture.- Parameters:
filename- The file from which the object is to be created.left- The distance from the left edge of the picture to the left edge of the chart area, in pixels.top- The distance from the top edge of the picture to the top edge of the chart area, in pixels.width- The width of the picture, in pixels.height- The height of the picture, in pixels.- Returns:
- The
IShapeThe object. - Throws:
IOException
-
addPictureInPixel
IShape addPictureInPixel(InputStream stream, ImageType type, double left, double top, double width, double height) throws IOException Creates a picture from an existing stream. Returns theIShapeobject that represents the new picture.- Parameters:
stream- The stream from which the object is to be created.type- Specifies the type of picture to create.left- The distance from the left edge of the picture to the left edge of the chart area, in pixels.top- The distance from the top edge of the picture to the top edge of the chart area, in pixels.width- The width of the picture, in pixels.height- The height of the picture, in pixels.- Returns:
- The
IShapeThe object. - Throws:
IOException
-
setSourceData
Sets the source data range for the chart.- Parameters:
source- The range that contains the source data.plotBy- Specifies the way the data is to be plotted. Can be either of thefollowingRowColconstants: Columns or Rows.
-
setSourceData
Sets the source data range for the chart.- Parameters:
source- The range that contains the source data.
-
delete
void delete()Deletes the object.
-