Chart.ChartType 属性 (Excel)Chart.ChartType property (Excel)

返回或设置图表类型。Returns or sets the chart type. 可读/写 XlChartTypeRead/write XlChartType.

语法Syntax

表达式ChartTypeexpression.ChartType

expression:一个表示 Chart 对象的变量。expression A variable that represents a Chart object.

备注Remarks

某些图表类型对数据透视图报表无效。Some chart types aren't available for PivotChart reports.

示例Example

当图表为二维气泡图时,本示例将第一个图表组中的气泡大小设置为默认大小的 200%。This example sets the bubble size in chart group one to 200% of the default size if the chart is a 2D bubble chart.

With Worksheets(1).ChartObjects(1).Chart 
 If .ChartType = xlBubble Then 
 .ChartGroups(1).BubbleScale = 200 
 End If 
End With

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.