接口 IChart


public interface IChart
Represents a chart object in a worksheet.
  • 方法详细资料

    • getName

      String getName()
      Returns the name of the object.
    • getParent

      IShape getParent()
      Returns the parent IShape of the chart.
    • getChartType

      ChartType getChartType()
      Returns the chart type.
    • setChartType

      void setChartType(ChartType value)
      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 the IChartArea object that represents the complete chart areafor the chart.
    • getChartTitle

      IChartTitle getChartTitle()
      Returns the IChartTitle object that represents the title of thespecified chart.
    • getPlotArea

      IPlotArea getPlotArea()
      Returns the IPlotArea object that represents the plot area of achart.
    • getLegend

      ILegend getLegend()
      Returns the ILegend object that represents the legend for the chart.
    • getDataTable

      IDataTable getDataTable()
      Returns the IDataTable object that represents the chart data table.
    • getFloor

      IFloor getFloor()
      Returns the IFloor object that represents the floor of the 3-D chart.
    • getWalls

      IWall getWalls()
      Returns the IWall object that represents the walls of the 3-D chart.
    • getSideWall

      IWall getSideWall()
      Returns the IWall object that allows the user to individually formatthe side wall of a 3-D chart.
    • getBackWall

      IWall getBackWall()
      Returns the IWall 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

      void setBarShape(BarShape value)
      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

      void setDisplayBlanksAs(DisplayBlanksAs value)
      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 the IPivotTable 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 the IPivotOptions object that represents theoptions whether to display pivot chart buttons.
    • getArea3DGroup

      IChartGroup getArea3DGroup()
      Returns the IChartGroup object that represents the area chart groupon a 3-D chart.
    • getBar3DGroup

      IChartGroup getBar3DGroup()
      Returns the IChartGroup object that represents the bar chart group ona 3-D chart.
    • getColumn3DGroup

      IChartGroup getColumn3DGroup()
      Returns the IChartGroup object that represents the column chart groupon a 3-D chart.
    • getLine3DGroup

      IChartGroup getLine3DGroup()
      Returns the IChartGroup object that represents the line chart groupon a 3-D chart.
    • getPie3DGroup

      IChartGroup getPie3DGroup()
      Returns the IChartGroup object that represents the pie chart group ona 3-D chart.
    • getSurfaceGroup

      IChartGroup getSurfaceGroup()
      Returns the IChartGroup 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 groups IChartGroups, on a 2D chart.
    • getBarGroups

      IChartGroups getBarGroups()
      Returns an object that represents a collection of the bar chart groups IChartGroups, on a 2D chart.
    • getColumnGroups

      IChartGroups getColumnGroups()
      Returns an object that represents a collection of the column chart groups IChartGroups, on a 2D chart.
    • getDoughnutGroups

      IChartGroups getDoughnutGroups()
      Returns an object that represents a collection of the doughnut chart groups IChartGroups, on a 2D chart.
    • getLineGroups

      IChartGroups getLineGroups()
      Returns an object that represents a collection of the line chart groups IChartGroups, on a 2D chart.
    • getPieGroups

      IChartGroups getPieGroups()
      Returns an object that represents a collection of the pie chart groups IChartGroups, on a 2D chart.
    • getRadarGroups

      IChartGroups getRadarGroups()
      Returns an object that represents a collection of the radar chart groups IChartGroups, on a 2D chart.
    • getXYGroups

      IChartGroups getXYGroups()
      Returns an object that represents a collection of the scatter chart groups IChartGroups, on a 2D chart.
    • getChartGroups

      IChartGroups getChartGroups()
      Returns an object that represents a collection of all the chart groups in the chart IChartGroups. The returned collection includes every type of group.
    • addShape

      IShape addShape(AutoShapeType type, double left, double top, double width, double height)
      Returns the IShape 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 IShapeThe object.
    • addChart

      IShape addChart(ChartType chartType, double left, double top, double width, double height)
      Creates a chart at the specified location on the chart.
      参数:
      chartType - The chart type
      left - 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 object
      height - The height, in points, of the object
      返回:
      The IShapeThe object.
    • addConnector

      IShape addConnector(ConnectorType type, double beginX, double beginY, double endX, double endY)
      Creates a connector. Returns the IShape 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 the IShape 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 IShapeThe 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 the IShape 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 IShapeThe object.
      抛出:
      IOException
    • addShapeInPixel

      IShape addShapeInPixel(AutoShapeType type, double left, double top, double width, double height)
      Returns the IShape 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 IShapeThe object.
    • addChartInPixel

      IShape addChartInPixel(ChartType chartType, double left, double top, double width, double height)
      Creates a chart at the specified location on the chart.
      参数:
      chartType - The chart type
      left - 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 object
      height - The height, in pixels, of the object
      返回:
      The IShapeThe object.
    • addConnectorInPixel

      IShape addConnectorInPixel(ConnectorType type, double beginX, double beginY, double endX, double endY)
      Creates a connector. Returns the IShape 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 the IShape 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 IShapeThe 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 the IShape 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 IShapeThe object.
      抛出:
      IOException
    • setSourceData

      void setSourceData(IRange source, RowCol plotBy)
      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 thefollowing RowCol constants: Columns or Rows.
    • setSourceData

      void setSourceData(IRange source)
      Sets the source data range for the chart.
      参数:
      source - The range that contains the source data.
    • delete

      void delete()
      Deletes the object.