Class Chart (Word VBA)

The class Chart represents a chart in a document.

The classes InlineShape and Shape. give access to class Chart


Dim chr as Chart
Set chr = ActiveDocument.Background.Chart

Methods

ApplyChartTemplate - Applies a standard or custom chart type to a chart.

ApplyDataLabels - Applies data labels to all the series in a chart.

ApplyLayout - Applies the layouts shown in the ribbon.

Axes - Returns a collection of axes on the chart.

ChartWizard - 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 noninteractive, 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.

Copy - Not supported for this object.

CopyPicture - Copies the selected object to the Clipboard as a picture.

Delete - Deletes the object.

Export - Exports the chart in a graphic format.

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

GetChartElement - Returns information about the chart element at the specified x-coordinate and y-coordinate.

Paste - Pastes chart data from the Clipboard into the chart.

Refresh - Causes the specified chart to be redrawn immediately.

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

Select - Selects the object.

SeriesCollection - Returns all the series in the chart.

SetBackgroundPicture - Sets the background graphic for a chart.

SetDefaultChart - Specifies the name of the chart template that Microsoft Word uses when it creates new charts.

SetElement - Sets chart elements on a chart.

SetSourceData - Sets the source data range for the chart.

Properties

AutoScaling true if Microsoft Word scales a 3D chart so that it is closer in size to the equivalent 2D chart. The RightAngleAxes property must be True.

BackWall returns an object that allows the user to individually format the back wall of a 3D chart.

BarShape returns or sets the shape used for every series in a 3D bar or column chart.

CategoryLabelLevel returns or sets an XlCategoryLabel constant that specifies the source level of the chart category labels.

ChartArea returns the complete chart area for the chart.

ChartColor returns or sets an integer that represents the color scheme for the chart.

ChartData returns information about the linked or embedded data associated with a chart.

ChartGroups returns an chartgroups 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.

ChartTitle returns the title of the specified chart.

ChartType returns or sets the chart type.

DataTable returns the chart data table.

DepthPercent returns or sets the depth of a 3D chart as a percentage of the chart width (between 20 and 2000 percent).

DisplayBlanksAs returns or sets the way that blank cells are plotted on a chart. Can be one of the XlDisplayBlanksAs constants.

Elevation returns or sets the elevation, in degrees, of the 3D chart view.

Floor returns the floor of the 3D chart.

GapDepth returns or sets the distance, as a percentage of the marker width, between the data series in a 3D chart.

HasAxis returns or sets which axes exist on the chart. Read/write Variant.

HasDataTable true if the chart has a data table.

HasLegend true if the chart has a legend.

HasTitle true if the axis or chart has a visible title.

HeightPercent returns or sets the height of a 3D chart as a percentage of the chart width (from 5 through 500 percent).

Legend returns the legend for the chart.

Perspective returns or sets the perspective for the 3D chart view.

PivotLayout not supported for this object.

PlotArea returns the plot area of a chart.

PlotBy returns or sets the way columns or rows are used as data series on the chart.

PlotVisibleOnly true if only visible cells are plotted. False if both visible and hidden cells are plotted.

RightAngleAxes true if the chart axes are at right angles, independent of chart rotation or elevation. Read/write Boolean.

Rotation returns or sets the rotation, in degrees, of the 3D chart view (the rotation of the plot area around the z-axis). Read/write Variant.

SeriesNameLevel returns or sets an XlSeriesNameLevel constant that specifies the source level of the series names.

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

ShowAllFieldButtons returns or sets whether to display all field buttons on a PivotChart. Read/write. Deprecated.

ShowAxisFieldButtons returns or sets whether to display axis field buttons on a PivotChart. Read/write. Deprecated.

ShowDataLabelsOverMaximum returns or sets a value that indicates whether to show the data labels when the value is greater than the maximum value on the value axis.

ShowLegendFieldButtons returns or sets whether to display legend field buttons on a PivotChart. Read/write. Deprecated.

ShowReportFilterFieldButtons returns or sets whether to display the report filter field buttons on a PivotChart. Read/write. Deprecated.

ShowValueFieldButtons returns or sets whether to display the value field buttons on a PivotChart. Read/write. Deprecated.

SideWall returns a Walls object that allows the user to individually format the side wall of a 3D chart.

Walls returns the walls of the 3D chart.

Axes - Represents a collection of all the Axis objects in the specified chart.

ChartArea - Represents the chart area of a chart.

ChartData - Represents access to the linked or embedded data associated with a chart.

ChartGroups - Represents one or more series plotted in a chart with the same format.

ChartTitle - Represents the chart title.

DataTable - Represents a chart data table.

Floor - Represents the floor of a 3D chart.

FullSeriesCollection - Represents the full collection of all chart series, both filtered and unfiltered.

Legend - Represents the legend in a chart. Each chart can have only one legend.

PlotArea - Represents the plot area of a chart.

SeriesCollection - Represents a collection of all the Series objects in the specified chart or chart group.

Shapes - A collection of Shape objects that represent all the shapes in a document or all the shapes in all the headers and footers in a document. Each Shape object represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, or picture.

Walls - Represents the walls of a 3D chart.