Excel) (Point.MarkerBackgroundColor 属性

将数据标志的背景色设置为 RGB 值或返回对应的颜色索引值。 背景色在应用程序中显示为填充颜色。 仅适用于折线图、散点图和雷达图。 Long 类型,可读写。

语法

表达式。MarkerBackgroundColor

表达式 表示 点 对象的变量。

示例

此示例为 Chart1 上系列 1 中的第一个点设置标记背景 (填充) 和前景 (边框) 颜色。

With Charts("Chart1").SeriesCollection(1).Points(1) 
 .MarkerBackgroundColor = RGB(0,255,0) ' green fill
 .MarkerForegroundColor = RGB(255,0,0) ' red border
End With

本示例将 Chart1 上系列 1 中第二个点的标记颜色设置为自动。

With Charts("Chart1").SeriesCollection(1).Points(2) 
 .MarkerBackgroundColor = -1 ' automatic fill
 .MarkerForegroundColor = -1 ' automatic border
End With

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。