接口 IChart
public interface IChart
Represents a chart object in a worksheet.
-
方法概要
修饰符和类型方法说明Creates 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 theIShape
object that represents the new AutoShape in the chart.addShapeInPixel
(AutoShapeType type, double left, double top, double width, double height) Returns theIShape
object that represents the new AutoShape in the chart.void
delete()
Deletes the object.Returns theIChartGroup
object 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.boolean
Gets 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 theIWall
object that allows the user to individually formatthe back wall of a 3-D chart.Returns theIChartGroup
object 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 theIChartArea
object that represents the complete chart areafor the chart.Returns an object that represents a collection of all the chart groups in the chartIChartGroups
.Returns theIChartTitle
object that represents the title of thespecified chart.Returns the chart type.Returns theIChartGroup
object 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 theIDataTable
object that represents the chart data table.int
Returns 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.boolean
Gets whether show #N/A as empty cell.Returns an object that represents a collection of the doughnut chart groupsIChartGroups
, on a 2D chart.double
Returns the elevation of the 3-D chart view in degrees.getFloor()
Returns theIFloor
object that represents the floor of the 3-D chart.int
Returns the distance between the data series in a 3-D chart as a percentage of the marker width.boolean
Gets a value indicating whether the chart displays a data table.boolean
Gets whether the chart has a legend.boolean
Gets whether the axis or chart has a visible title.int
Returns the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).Returns theILegend
object that represents the legend for the chart.Returns theIChartGroup
object 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 parentIShape
of the chart.int
Returns the perspective for the 3-D chart view.Returns theIChartGroup
object 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 theIPivotOptions
object that represents theoptions whether to display pivot chart buttons.Returns theIPivotTable
object that represents the thePivotTable report containing the upper-left corner of the specified range, or the PivotTable report associated with the PivotChart report.Returns theIPlotArea
object that represents the plot area of achart.boolean
Gets whether visible cells are plotted.Returns an object that represents a collection of the radar chart groupsIChartGroups
, on a 2D chart.boolean
Gets whether the chart axes are at right angles, independent of chart rotation or elevation.double
Returns 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.boolean
Gets whether to show the data labels when the value is greater than the maximum value on the value axis.Returns theIWall
object that allows the user to individually formatthe side wall of a 3-D chart.Returns theIChartGroup
object that represents the surface chartgroup of a 3-D chart.getWalls()
Returns theIWall
object 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.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.void
setBarShape
(BarShape value) Sets the shape used with the 3-D bar or column chart.void
setChartType
(ChartType value) Sets the chart type.void
setDepthPercent
(int value) Sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).void
Sets the way that blank cells are plotted on a chart.void
setDisplayNaAsBlank
(boolean value) Sets whether show #N/A as empty cell.void
setElevation
(double value) Sets the elevation of the 3-D chart view in degrees.void
setGapDepth
(int value) Sets the distance between the data series in a 3-D chart as a percentage of the marker width.void
setHasDataTable
(boolean value) Sets a value indicating whether the chart displays a data table.void
setHasLegend
(boolean value) Sets whether the chart has a legend.void
setHasTitle
(boolean value) Sets whether the axis or chart has a visible title.void
setHeightPercent
(int value) Sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).void
setPerspective
(int value) Sets the perspective for the 3-D chart view.void
setPlotVisibleOnly
(boolean value) Sets whether visible cells are plotted.void
setRightAngleAxes
(boolean value) Sets whether the chart axes are at right angles, independent of chart rotation or elevation.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).void
setShowDataLabelsOverMaximum
(boolean value) Sets whether to show the data labels when the value is greater than the maximum value on the value axis.void
setSourceData
(IRange source) Sets the source data range for the chart.void
setSourceData
(IRange source, RowCol plotBy) Sets the source data range for the chart.
-
方法详细资料
-
getName
String getName()Returns the name of the object. -
getParent
IShape getParent()Returns the parentIShape
of 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 theIChartArea
object that represents the complete chart areafor the chart. -
getChartTitle
IChartTitle getChartTitle()Returns theIChartTitle
object that represents the title of thespecified chart. -
getPlotArea
IPlotArea getPlotArea()Returns theIPlotArea
object that represents the plot area of achart. -
getLegend
ILegend getLegend()Returns theILegend
object that represents the legend for the chart. -
getDataTable
IDataTable getDataTable()Returns theIDataTable
object that represents the chart data table. -
getFloor
IFloor getFloor()Returns theIFloor
object that represents the floor of the 3-D chart. -
getWalls
IWall getWalls()Returns theIWall
object that represents the walls of the 3-D chart. -
getSideWall
IWall getSideWall()Returns theIWall
object that allows the user to individually formatthe side wall of a 3-D chart. -
getBackWall
IWall getBackWall()Returns theIWall
object 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:DisplayBlanksAs
constants: NotPlotted, Interpolated, orZero. -
setDisplayBlanksAs
Sets the way that blank cells are plotted on a chart. Can be one of the following:DisplayBlanksAs
constants: 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 Microsoft.Office.Interop.Excel._Chart.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 Microsoft.Office.Interop.Excel._Chart.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. -
getPivotTable
IPivotTable getPivotTable()Returns theIPivotTable
object 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 theIPivotOptions
object that represents theoptions whether to display pivot chart buttons. -
getArea3DGroup
IChartGroup getArea3DGroup()Returns theIChartGroup
object that represents the area chart groupon a 3-D chart. -
getBar3DGroup
IChartGroup getBar3DGroup()Returns theIChartGroup
object that represents the bar chart group ona 3-D chart. -
getColumn3DGroup
IChartGroup getColumn3DGroup()Returns theIChartGroup
object that represents the column chart groupon a 3-D chart. -
getLine3DGroup
IChartGroup getLine3DGroup()Returns theIChartGroup
object that represents the line chart groupon a 3-D chart. -
getPie3DGroup
IChartGroup getPie3DGroup()Returns theIChartGroup
object that represents the pie chart group ona 3-D chart. -
getSurfaceGroup
IChartGroup getSurfaceGroup()Returns theIChartGroup
object 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 theIShape
object that represents the new AutoShape in the chart.- 参数:
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.- 返回:
- The
IShape
The object.
-
addChart
Creates a chart at the specified location on the chart.- 参数:
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- 返回:
- The
IShape
The object.
-
addConnector
Creates a connector. Returns theIShape
object that represents the new connector.- 参数:
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.- 返回:
- The
IShape
object.
-
addPicture
IShape addPicture(String filename, double left, double top, double width, double height) throws IOException Creates a picture from an existing file. Returns theIShape
object that represents the new picture.- 参数:
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.- 返回:
- The
IShape
The object. - 抛出:
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 theIShape
object that represents the new picture.- 参数:
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.- 返回:
- The
IShape
The object. - 抛出:
IOException
-
addShapeInPixel
Returns theIShape
object that represents the new AutoShape in the chart.- 参数:
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.- 返回:
- The
IShape
The object.
-
addChartInPixel
Creates a chart at the specified location on the chart.- 参数:
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- 返回:
- The
IShape
The object.
-
addConnectorInPixel
IShape addConnectorInPixel(ConnectorType type, double beginX, double beginY, double endX, double endY) Creates a connector. Returns theIShape
object that represents the new connector.- 参数:
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.- 返回:
- The
IShape
object.
-
addPictureInPixel
IShape addPictureInPixel(String filename, double left, double top, double width, double height) throws IOException Creates a picture from an existing file. Returns theIShape
object that represents the new picture.- 参数:
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.- 返回:
- The
IShape
The object. - 抛出:
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 theIShape
object that represents the new picture.- 参数:
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.- 返回:
- The
IShape
The object. - 抛出:
IOException
-
setSourceData
Sets the source data range for the chart.- 参数:
source
- The range that contains the source data.plotBy
- Specifies the way the data is to be plotted. Can be either of thefollowingRowCol
constants: Columns or Rows.
-
setSourceData
Sets the source data range for the chart.- 参数:
source
- The range that contains the source data.
-
delete
void delete()Deletes the object.
-