主题
MarkerBackgroundColorIndex (属性)
返回或设置数据标志的背景色,表示为当前调色板中的索引或下列 XlColorIndex 常量之一:xlColorIndexAutomatic 或 xlColorIndexNone。仅适用于折线图、散点图和雷达图。int 类型,可读写。
示例
python
#此示例通过背景颜色的索引值将图表工作表 Chart1 上的第二个数据系列数据标志的背景色设置为红色
def test():
series2 = Application.Charts.Item("Chart1").ChartObjects(1).Chart.SeriesCollection(2)
series2.MarkerBackgroundColorIndex = 3
python
#此示例显示活动工作表上的第一个图表的第一个系列数据标志的背景色是否为自动配色
def test():
print(ActiveSheet.ChartObjects(1).Chart.SeriesCollection(1).MarkerBackgroundColorIndex == xlColorIndexAutomatic)