Skip to content
本页内容

Top (属性)

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

示例

python
#本示例显示图表工作表 Chart1 中图表的分类轴到图表顶部的距离
def test():
    axis = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Axes(xlCategory)
    print(f"分类轴到图表顶部的距离:{axis.Top} 磅")
python
#本示例显示工作表 Sheet1 中第一张图表的数值轴到图表顶部的距离是否为 0 磅
def test():
    axis = Application.Sheets.Item("Sheet1").ChartObjects(1).Chart.Axes(xlValue)
    print(axis.Top == 0)