主题
Chart (属性)
返回 Chart 对象,该对象代表形状中包含的图表。只读。
示例
python
#本示例将活动工作表上第一个形状的标题设置为"销售数据"
def test():
shape = ActiveSheet.Shapes.Item(1)
chart = shape.Chart
chart.HasTitle = True
chart.ChartTitle.Text = "销售数据"
python
#本示例将第一张工作表上的第一个形状的X轴标题设置为"月份"
def test():
shape = Worksheets.Item(1).Shapes.Item(1)
chart = shape.Chart
chart.Axes(xlCategory).HasTitle = True
chart.Axes(xlCategory).AxisTitle.Text = "月份"