主题
Left (属性)
返回或设置 float 值,它代表从对象左边缘到工作表的 A 列左边缘或图表上的图表区左边缘的距离(以磅为单位)。
示例
python
#本示例将工作表 Sheet1 中第一张图表的分类轴标题设置为距离图表区左边缘 20 磅
def test():
axistitle = Application.Sheets.Item("Sheet1").ChartObjects(1).Chart.Axes(xlCategory).AxisTitle
axistitle.Left = 20
python
#本示例显示图表工作表 Chart1 中图表的数值轴标题到图表区左边缘的距离
def test():
axistitle = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Axes(xlValue).AxisTitle
print(f"数值轴标题到图表左边缘的距离:{axistitle.Left} 磅")