Chart Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a chart in a document.
public interface class Chart
[System.Runtime.InteropServices.Guid("6FFA84BB-A350-4442-BB53-A43653459A84")]
public interface Chart
type Chart = interface
Public Interface Chart
- Attributes
Examples
The InlineShapes collection contains an object for each inline shape, including charts, in a document. Use InlineShapes(Index
), where Index
is the index number of an inline shape, to return a single InlineShape object. Use the HasChart property to determine if the InlineShape object represents a chart. If the HasChart property is set to True, use the Chart property to return a Chart object.
You can also use the Type property to determine if the InlineShape object represents a chart. If the Type property is set to WdInlineShapeChart, the inline shape represents a chart.
Remarks
The following properties and methods for returning a Chart object are described in the example section:
Properties
Application |
When used without an object qualifier, this property returns an _Application object that represents the Microsoft Word application. When used with an object qualifier, this property returns an Application object that represents the creator of the specified object (you can use this property with an OLE Automation object to return the application of that object). Read-only. |
Area3DGroup |
Returns the area chart group on a 3-D chart. |
AutoScaling |
Scales a 3-D chart so that it's closer in size to the equivalent 2-D chart. The RightAngleAxes property must be True. Read/write. |
BackWall |
Returns a Walls object that allows the user to individually format the back wall of a 3-D chart. Read-only. |
Bar3DGroup |
Returns the bar chart group on a 3-D chart. |
BarShape |
Returns or sets the shape used for every series in a 3-D bar or column chart. Read/write. |
CategoryLabelLevel |
Returns or sets an XlCategoryLabelLevel constant that specifies the source level of the chart category labels. Read-write. |
ChartArea |
Returns a ChartArea object that represents the complete chart area for the chart. Read-only. |
ChartColor |
Returns or sets an integer that represents the color scheme for the chart. Read-write. |
ChartData |
Returns information about the linked or embedded data associated with a chart. Read-only. |
ChartGroups[Object] |
Returns an object that represents either a single chart group or a collection of all the chart groups in the chart. |
ChartStyle |
Returns or sets the chart style for the chart. Read/write Object. |
ChartTitle |
Returns a ChartTitle object that represents the title of the specified chart. Read-only. |
ChartType |
Returns or sets the chart type. Read/write. |
Column3DGroup |
Returns the column chart group on a 3-D chart. |
Corners |
Returns the corners of a 3-D chart. |
Creator |
Returns a 32-bit Integer that indicates the application in which the specified object was created. Read-only. |
DataTable |
Returns a DataTable object that represents the chart data table. Read-only. |
DepthPercent |
Returns or sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent). Read/write. |
DisplayBlanksAs |
Returns or sets the way that blank cells are plotted on a chart. Can be one of the XlDisplayBlanksAs constants. Read/write. |
Elevation |
Returns or sets the elevation of the 3-D chart view, in degrees. Read/write. |
Floor |
Returns a Floor object that represents the floor of the 3-D chart. Read-only. |
GapDepth |
Returns or 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. Read/write. |
HasAxis[Object, Object] |
Returns or sets which axes exist on the chart. Read/write. |
HasDataTable |
Gets or sets a value that indicates whether the Chart has a data table. Read/write. |
HasHiddenContent | |
HasLegend |
Returns True if the chart has a legend. Read/write. |
HasPivotFields |
Determines if the PivotChart controls are displayed on the specified PivotChart report |
HasTitle |
True if the axis or chart has a visible title. Read/write. |
HeightPercent |
Returns or sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent). Read/write. |
Legend |
Returns a Legend object that represents the legend for the chart. Read-only. |
Line3DGroup |
Returns the line chart group on a 3-D chart. |
Parent |
Returns the parent for the specified object. Read-only. |
Perspective |
Returns or sets an Integer value that represents the perspective for the 3-D chart view. |
Pie3DGroup |
Returns the pie chart group on a 3-D chart. |
PivotLayout |
Not supported for this object. |
PlotArea |
Returns a PlotArea object that represents the plot area of a chart. Read-only. |
PlotBy |
Returns or sets the way columns or rows are used as data series on the chart. Can be one of the following XlRowCol constants: xlColumns or xlRows. Read/write. |
PlotVisibleOnly |
Gets or Sets a value that indicates whether only visible cells are plotted. Read/write. |
RightAngleAxes |
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. Read/write. |
Rotation |
Returns or 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. Read/write. |
SeriesNameLevel |
Returns or sets an XlSeriesNameLevel constant that specifies the source level of the series names. Read-write. |
Shapes |
Returns a Shapes collection that represents all the shapes on the chart sheet. Read-only. |
ShowAllFieldButtons |
This object, member, or enumeration is deprecated and is not intended to be used in your code. |
ShowAxisFieldButtons |
This object, member, or enumeration is deprecated and is not intended to be used in your code. |
ShowDataLabelsOverMaximum |
Returns or sets whether to show the data labels when the value is greater than the maximum value on the value axis. Read/write. |
ShowLegendFieldButtons |
This object, member, or enumeration is deprecated and is not intended to be used in your code. |
ShowReportFilterFieldButtons |
This object, member, or enumeration is deprecated and is not intended to be used in your code.. |
ShowValueFieldButtons |
This object, member, or enumeration is deprecated and is not intended to be used in your code.. |
SideWall |
Returns a Walls object that allows the user to individually format the side wall of a 3-D chart. Read-only. |
SubType |
This API supports the Visual Studio Tools for Office infrastructure and is not intended to be used directly from your code. |
SurfaceGroup |
Returns the surface chart group of a 3-D chart. |
Type |
Reserved for internal use. |
Walls |
Returns a Walls object that represents the walls of the 3-D chart. Read-only. |
Methods
ApplyChartTemplate(String) |
Applies a standard or custom chart type to a chart. |
ApplyCustomType(XlChartType, Object) |
Applies a standard or custom chart type to a chart. |
ApplyDataLabels(XlDataLabelsType, Object, Object, Object, Object, Object, Object, Object, Object, Object) |
Applies data labels to all the series in a chart. |
ApplyLayout(Int32, Object) |
Applies the layouts shown in the ribbon. |
AreaGroups(Object) |
On a 2-D chart, returns an object that represents either a single area chart group (a ChartGroup object) or a collection of the area chart groups (a ChartGroups collection). |
AutoFormat(Int32, Object) |
This API supports the Visual Studio Tools for Office infrastructure and is not intended to be used directly from your code. |
Axes(Object, XlAxisGroup) |
Gets an object that either represents a single axis or a collection of axes on the chart. |
BarGroups(Object) |
On a 2-D chart, returns an object that represents either a single bar chart group (a ChartGroup object) or a collection of the bar chart groups (a ChartGroups collection). |
ChartWizard(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) |
Modifies the properties of the given chart. You can use this method to quickly format a chart without setting all the individual properties. This method is non-interactive, and it changes only the specified properties. |
ClearToMatchColorStyle() |
Clears all colors on the specified chart that do not follow the color style applied to the chart. |
ClearToMatchStyle() |
Clears the chart elements formatting to automatic. |
ColumnGroups(Object) |
On a 2-D chart, returns an object that represents either a single column chart group (a ChartGroup object) or a collection of the column chart groups (a ChartGroups collection). |
Copy(Object, Object) |
Not supported for this object. |
CopyPicture(XlPictureAppearance, XlCopyPictureFormat, XlPictureAppearance) |
Copies the selected object to the Clipboard as a picture. |
Delete() |
Deletes the object. |
DeleteHiddenContent() | |
DoughnutGroups(Object) |
On a 2-D chart, returns an object that represents either a single doughnut chart group (a ChartGroup object) or a collection of the doughnut chart groups (a ChartGroups collection). |
Export(String, Object, Object) |
Exports the chart in a graphic format. This method returns a Boolean value indicating whether the export was successful. |
FullSeriesCollection(Object) |
Returns the collection of all the series in the specified chart, or the specified series. |
GetChartElement(Int32, Int32, Int32, Int32, Int32) |
Returns information about the chart element at specified X and Y coordinates. This method is unusual in that you specify values for only the first two arguments. Microsoft Word fills in the other arguments, and your code should examine those values when the method returns. |
LineGroups(Object) |
On a 2-D chart, returns an object that represents either a single line chart group (a ChartGroup object) or a collection of the line chart groups (a ChartGroups collection). |
Paste(Object) |
Pastes chart data from the Clipboard into the specified chart. |
PieGroups(Object) |
On a 2-D chart, returns an object that represents either a single pie chart group (a ChartGroup object) or a collection of the pie chart groups (a ChartGroups collection). |
RadarGroups(Object) |
On a 2-D chart, returns an object that represents either a single radar chart group (a ChartGroup object) or a collection of the radar chart groups (a ChartGroups collection). |
Refresh() |
Causes the specified chart to be redrawn immediately. |
SaveChartTemplate(String) |
Saves a custom chart template to the list of available chart templates. |
Select(Object) |
Selects the object. |
SeriesCollection(Object) |
Returns an Object that represents all the series in the chart. |
SetBackgroundPicture(String) |
Sets the background graphic for a chart. |
SetDefaultChart(Object) |
Specifies the name of the chart template that Microsoft Word uses when creating new charts. |
SetElement(MsoChartElementType) |
Sets chart elements on a chart. Read/write. |
SetSourceData(String, Object) |
Sets the source data range for the Chart. |
XYGroups(Object) |
On a 2-D chart, returns an object that represents either a single scatter chart group (a ChartGroup object) or a collection of scatter chart groups (a ChartGroups collection). |