Skip to content
本页内容

Top (属性)

返回或设置一个 float值,它代表从对象的上边缘到工作表第一行顶部或图表上的图表区顶部的距离(以磅为单位)。

示例

python
#本示例显示 Chart1 中的绘图区上边缘到图表上的图表区顶部的距离
def test():
    plotArea = Application.Charts.Item("Chart1").ChartObjects(1).Chart.PlotArea
    print(plotArea.Top)
python
#下例将 Sheet1 上第一个图表的绘图区上边缘到图表上的图表区顶部的距离设置为50磅
def test():
    plotArea = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.PlotArea
    plotArea.Top = 50