Skip to content
本页内容

Position (属性)

返回或设置图表上绘制区域的位置。可读/写 XlChartElementPosition类型。

示例

python
#本示例显示 Chart1 中的绘图区位置是否为xlChartElementPositionAutomatic
def test():
    plotArea = Application.Charts.Item("Chart1").ChartObjects(1).Chart.PlotArea
    print(plotArea.Position == xlChartElementPositionAutomatic)
python
#下例将 Sheet1 上第一个图表的绘图区位置设置成xlChartElementPositionCustom
def test():
    plotArea = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.PlotArea
    plotArea.Position = xlChartElementPositionCustom