Chart Chart Chart Interface

Definition

Represents a chart in a document.

public interface class Chart
[System.Runtime.InteropServices.Guid("6FFA84BB-A350-4442-BB53-A43653459A84")]
public interface Chart
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 Application 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 Area3DGroup Area3DGroup

Returns the area chart group on a 3-D chart.

AutoScaling AutoScaling 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 BackWall BackWall

Returns a Walls object that allows the user to individually format the back wall of a 3-D chart. Read-only.

Bar3DGroup Bar3DGroup Bar3DGroup

Returns the bar chart group on a 3-D chart.

BarShape BarShape BarShape

Returns or sets the shape used for every series in a 3-D bar or column chart. Read/write.

CategoryLabelLevel CategoryLabelLevel CategoryLabelLevel

Returns or sets an XlCategoryLabelLevel constant that specifies the source level of the chart category labels. Read-write.

ChartArea ChartArea ChartArea

Returns a ChartArea object that represents the complete chart area for the chart. Read-only.

ChartColor ChartColor ChartColor

Returns or sets an integer that represents the color scheme for the chart. Read-write.

ChartData ChartData ChartData

Returns information about the linked or embedded data associated with a chart. Read-only.

ChartGroups[Object] ChartGroups[Object] ChartGroups[Object]

Returns an object that represents either a single chart group or a collection of all the chart groups in the chart.

ChartStyle ChartStyle ChartStyle

Returns or sets the chart style for the chart. Read/write Object.

ChartTitle ChartTitle ChartTitle

Returns a ChartTitle object that represents the title of the specified chart. Read-only.

ChartType ChartType ChartType

Returns or sets the chart type. Read/write.

Column3DGroup Column3DGroup Column3DGroup

Returns the column chart group on a 3-D chart.

Corners Corners Corners

Returns the corners of a 3-D chart.

Creator Creator Creator

Returns a 32-bit Integer that indicates the application in which the specified object was created. Read-only.

DataTable DataTable DataTable

Returns a DataTable object that represents the chart data table. Read-only.

DepthPercent DepthPercent 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 DisplayBlanksAs DisplayBlanksAs

Returns or sets the way that blank cells are plotted on a chart. Can be one of the XlDisplayBlanksAs constants. Read/write.

Elevation Elevation Elevation

Returns or sets the elevation of the 3-D chart view, in degrees. Read/write.

Floor Floor Floor

Returns a Floor object that represents the floor of the 3-D chart. Read-only.

GapDepth GapDepth 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] HasAxis[Object, Object] HasAxis[Object, Object]

Returns or sets which axes exist on the chart. Read/write.

HasDataTable HasDataTable HasDataTable

Gets or sets a value that indicates whether the Chart has a data table. Read/write.

HasHiddenContent HasHiddenContent HasHiddenContent
HasLegend HasLegend HasLegend

Returns True if the chart has a legend. Read/write.

HasPivotFields HasPivotFields HasPivotFields

Determines if the PivotChart controls are displayed on the specified PivotChart report

HasTitle HasTitle HasTitle

True if the axis or chart has a visible title. Read/write.

HeightPercent HeightPercent 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 Legend Legend

Returns a Legend object that represents the legend for the chart. Read-only.

Line3DGroup Line3DGroup Line3DGroup

Returns the line chart group on a 3-D chart.

Parent Parent Parent

Returns the parent for the specified object. Read-only.

Perspective Perspective Perspective

Returns or sets an Integer value that represents the perspective for the 3-D chart view.

Pie3DGroup Pie3DGroup Pie3DGroup

Returns the pie chart group on a 3-D chart.

PivotLayout PivotLayout PivotLayout

Not supported for this object.

PlotArea PlotArea PlotArea

Returns a PlotArea object that represents the plot area of a chart. Read-only.

PlotBy PlotBy 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 PlotVisibleOnly PlotVisibleOnly

Gets or Sets a value that indicates whether only visible cells are plotted. Read/write.

RightAngleAxes RightAngleAxes 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 Rotation 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 SeriesNameLevel SeriesNameLevel

Returns or sets an XlSeriesNameLevel constant that specifies the source level of the series names. Read-write.

Shapes Shapes Shapes

Returns a Shapes collection that represents all the shapes on the chart sheet. Read-only.

ShowAllFieldButtons ShowAllFieldButtons ShowAllFieldButtons

This object, member, or enumeration is deprecated and is not intended to be used in your code.

ShowAxisFieldButtons ShowAxisFieldButtons ShowAxisFieldButtons

This object, member, or enumeration is deprecated and is not intended to be used in your code.

ShowDataLabelsOverMaximum ShowDataLabelsOverMaximum 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 ShowLegendFieldButtons ShowLegendFieldButtons

This object, member, or enumeration is deprecated and is not intended to be used in your code.

ShowReportFilterFieldButtons ShowReportFilterFieldButtons ShowReportFilterFieldButtons

This object, member, or enumeration is deprecated and is not intended to be used in your code..

ShowValueFieldButtons ShowValueFieldButtons ShowValueFieldButtons

This object, member, or enumeration is deprecated and is not intended to be used in your code..

SideWall SideWall SideWall

Returns a Walls object that allows the user to individually format the side wall of a 3-D chart. Read-only.

SubType SubType SubType

This API supports the Visual Studio Tools for Office infrastructure and is not intended to be used directly from your code.

SurfaceGroup SurfaceGroup SurfaceGroup

Returns the surface chart group of a 3-D chart.

Type Type Type

Reserved for internal use.

Walls Walls Walls

Returns a Walls object that represents the walls of the 3-D chart. Read-only.

Methods

ApplyChartTemplate(String) ApplyChartTemplate(String) ApplyChartTemplate(String)

Applies a standard or custom chart type to a chart.

ApplyCustomType(XlChartType, Object) ApplyCustomType(XlChartType, Object) ApplyCustomType(XlChartType, Object)

Applies a standard or custom chart type to a chart.

ApplyDataLabels(XlDataLabelsType, Object, Object, Object, Object, Object, Object, Object, Object, Object) ApplyDataLabels(XlDataLabelsType, Object, Object, Object, Object, Object, Object, Object, Object, Object) ApplyDataLabels(XlDataLabelsType, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Applies data labels to all the series in a chart.

ApplyLayout(Int32, Object) ApplyLayout(Int32, Object) ApplyLayout(Int32, Object)

Applies the layouts shown in the ribbon.

AreaGroups(Object) AreaGroups(Object) 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) AutoFormat(Int32, Object) 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) Axes(Object, XlAxisGroup) Axes(Object, XlAxisGroup)

Gets an object that either represents a single axis or a collection of axes on the chart.

BarGroups(Object) BarGroups(Object) 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) ChartWizard(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) 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() ClearToMatchColorStyle() ClearToMatchColorStyle()

Clears all colors on the specified chart that do not follow the color style applied to the chart.

ClearToMatchStyle() ClearToMatchStyle() ClearToMatchStyle()

Clears the chart elements formatting to automatic.

ColumnGroups(Object) ColumnGroups(Object) 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) Copy(Object, Object) Copy(Object, Object)

Not supported for this object.

CopyPicture(XlPictureAppearance, XlCopyPictureFormat, XlPictureAppearance) CopyPicture(XlPictureAppearance, XlCopyPictureFormat, XlPictureAppearance) CopyPicture(XlPictureAppearance, XlCopyPictureFormat, XlPictureAppearance)

Copies the selected object to the Clipboard as a picture.

Delete() Delete() Delete()

Deletes the object.

DeleteHiddenContent() DeleteHiddenContent() DeleteHiddenContent()
DoughnutGroups(Object) DoughnutGroups(Object) 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) Export(String, Object, Object) 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) FullSeriesCollection(Object) FullSeriesCollection(Object)

Returns the collection of all the series in the specified chart, or the specified series.

GetChartElement(Int32, Int32, Int32, Int32, Int32) GetChartElement(Int32, Int32, Int32, Int32, Int32) 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) LineGroups(Object) 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) Paste(Object) Paste(Object)

Pastes chart data from the Clipboard into the specified chart.

PieGroups(Object) PieGroups(Object) 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) RadarGroups(Object) 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() Refresh() Refresh()

Causes the specified chart to be redrawn immediately.

SaveChartTemplate(String) SaveChartTemplate(String) SaveChartTemplate(String)

Saves a custom chart template to the list of available chart templates.

Select(Object) Select(Object) Select(Object)

Selects the object.

SeriesCollection(Object) SeriesCollection(Object) SeriesCollection(Object)

Returns an Object that represents all the series in the chart.

SetBackgroundPicture(String) SetBackgroundPicture(String) SetBackgroundPicture(String)

Sets the background graphic for a chart.

SetDefaultChart(Object) SetDefaultChart(Object) SetDefaultChart(Object)

Specifies the name of the chart template that Microsoft Word uses when creating new charts.

SetElement(MsoChartElementType) SetElement(MsoChartElementType) SetElement(MsoChartElementType)

Sets chart elements on a chart. Read/write.

SetSourceData(String, Object) SetSourceData(String, Object) SetSourceData(String, Object)

Sets the source data range for the Chart.

XYGroups(Object) XYGroups(Object) 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).

Applies to