HasDataLabel 属性 (Excel)Point.HasDataLabel property (Excel)

如果数据点具有数据标签,则该属性值为 TrueTrue if the point has a data label. 读/写 BooleanRead/write Boolean.

语法Syntax

表达式HasDataLabelexpression.HasDataLabel

_表达式_一个代表**Point** 对象的变量。expression A variable that represents a Point object.

示例Example

本示例打开 Chart1 上第三个数据系列中第七个数据点的数据标签, 然后将该数据标签的颜色设置为蓝色。This example turns on the data label for point seven in series three on Chart1, and then it sets the data label color to blue.

With Charts("Chart1").SeriesCollection(3).Points(7) 
 .HasDataLabel = True 
 .ApplyDataLabels Type:=xlValue 
 .DataLabel.Font.ColorIndex = 5 
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.