다음을 통해 공유


Chart Members (Excel)

Represents a chart in a workbook.

Methods

Name

Description

Activate

Makes the current chart the active chart.

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 an object that represents either a single axis or a collection of the axes on the chart.

ChartGroups

Returns an object that represents either a single chart group (a ChartGroup object) or a collection of all the chart groups in the chart (a ChartGroups object). The returned collection includes every type of group.

ChartObjects

Returns an object that represents either a single embedded chart (a ChartObject object) or a collection of all the embedded charts (a ChartObjects object) on the sheet.

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.

CheckSpelling

Checks the spelling of an object.

ClearToMatchStyle

Clears the chart elements formatting to automatic.

Copy

Copies the sheet to another location in the workbook.

CopyPicture

Copies the selected object to the Clipboard as a picture.

Delete

Deletes the object.

Evaluate

Converts a Microsoft Excel name to an object or a value.

Export

Exports the chart in a graphic format.

ExportAsFixedFormat

Exports to a file of the specified format.

GetChartElement

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 Excel fills in the other arguments, and your code should examine those values when the method returns.

Location

Moves the chart to a new location.

Move

Moves the chart to another location in the workbook.

OLEObjects

Returns an object that represents either a single OLE object (an OLEObject ) or a collection of all OLE objects (an OLEObjects collection) on the chart or sheet. Read-only.

Paste

Pastes chart data from the Clipboard into the specified chart.

PrintOut

Prints the object.

PrintPreview

Shows a preview of the object as it would look when printed.

Protect

Protects a chart so that it cannot be modified.

Refresh

Causes the specified chart to be redrawn immediately.

SaveAs

Saves changes to the chart or worksheet in a different file.

SaveChartTemplate

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

Select

Selects the object.

SeriesCollection

Returns an object that represents either a single series (a Series object) or a collection of all the series (a SeriesCollection collection) in the chart or chart group.

SetBackgroundPicture

Sets the background graphic for a chart.

SetDefaultChart

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

SetElement

Sets chart elements on a chart. Read/write MsoChartElementType.

SetSourceData

Sets the source data range for the chart.

Unprotect

Removes protection from a sheet or workbook. This method has no effect if the sheet or workbook isn't protected.

Properties

Name

Description

Application

When used without an object qualifier, this property returns an Application object that represents the Microsoft Excel 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.

AutoScaling

True if Microsoft Excel 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 Boolean.

BackWall

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

BarShape

Returns or sets the shape used with the 3-D bar or column chart. Read/write XlBarShape.

ChartArea

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

ChartStyle

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

ChartTitle

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

ChartType

Returns or sets the chart type. Read/write XlChartType.

CodeName

Returns the code name for the object. Read-only String.

Creator

Returns a 32-bit integer that indicates the application in which this object was created. Read-only Long.

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 Long.

DisplayBlanksAs

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

Elevation

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

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 Long.

HasAxis

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

HasDataTable

True if the chart has a data table. Read/write Boolean.

HasLegend

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

HasTitle

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

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 Long.

Hyperlinks

Returns a Hyperlinks collection that represents the hyperlinks for the chart.

Index

Returns a Long value that represents the index number of the object within the collection of similar objects.

Legend

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

MailEnvelope

Rrepresents an e-mail header for a document.

Name

Returns or sets a String value representing the name of the object.

Next

Returns a Worksheet object that represents the next sheet.

PageSetup

Returns a PageSetup object that contains all the page setup settings for the specified object. Read-only.

Parent

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

Perspective

Returns or sets a Long value that represents the perspective for the 3-D chart view.

PivotLayout

Returns a PivotLayout object that represents the placement of fields in a PivotTable report and the placement of axes in a PivotChart report. Read-only.

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 Long.

PlotVisibleOnly

True if only visible cells are plotted. False if both visible and hidden cells are plotted. Read/write Boolean.

Previous

Returns a Worksheet object that represents the next sheet.

PrintedCommentPages

Returns the number of comment pages that will be printed for the current chart. Read-only

ProtectContents

True if the contents of the sheet are protected. For a chart, this protects the entire chart. To turn on content protection, use the Protect method with the Contents argument set to True. Read-only Boolean.

ProtectData

True if series formulas cannot be modified by the user. Read/write Boolean.

ProtectDrawingObjects

True if shapes are protected. To turn on shape protection, use the Protect method with the DrawingObjects argument set to True. Read-only Boolean.

ProtectFormatting

True if chart formatting cannot be modified by the user. Read/write Boolean.

ProtectionMode

True if user-interface-only protection is turned on. To turn on user interface protection, use the Protect method with the UserInterfaceOnly argument set to True. Read-only Boolean.

ProtectSelection

True if chart elements cannot be selected. Read/write Boolean.

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 Boolean.

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 Variant.

Shapes

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

ShowAllFieldButtons

Returns or sets whether to display all field buttons on a PivotChart. Read/write

ShowAxisFieldButtons

Returns or sets whether to display axis field buttons on a PivotChart. Read/write

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 Boolean.

ShowLegendFieldButtons

Returns or sets whether to display legend field buttons on a PivotChart. Read/write

ShowReportFilterFieldButtons

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

ShowValueFieldButtons

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

SideWall

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

Tab

Returns a Tab object for a chart.

Visible

Returns or sets an XlSheetVisibility value that determines whether the object is visible.

Walls

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

Events

Name

Description

Activate

Occurs when a workbook, worksheet, chart sheet, or embedded chart is activated.

BeforeDoubleClick

Occurs when a chart element is double-clicked, before the default double-click action.

BeforeRightClick

Occurs when a chart element is right-clicked, before the default right-click action.

Calculate

Occurs after the chart plots new or changed data, for the Chart object.

Deactivate

Occurs when the chart, worksheet, or workbook is deactivated.

MouseDown

Occurs when a mouse button is pressed while the pointer is over a chart.

MouseMove

Occurs when the position of the mouse pointer changes over a chart.

MouseUp

Occurs when a mouse button is released while the pointer is over a chart.

Resize

Occurs when the chart is resized.

Select

Occurs when a chart element is selected.

SeriesChange

Occurs when the user changes the value of a chart data point by clicking a bar in the chart and dragging the top edge up or down thus changing the value of the data point.