Skip to content
本页内容

InsideWidth (属性)

以磅为单位返回绘图区内部宽度。可读写 float 类型。

说明

这种度量方式的图形区域不包含坐标轴标签。图形区域的 Width 属性使用包含坐标轴标签的封闭矩形。

示例

python
#本示例在 Chart1 中的绘图区内绘制带点线的矩形
def test():
    chart = Application.Charts("Chart1").ChartObjects(1).Chart
    plotArea = chart.PlotArea
    shape = chart.Shapes.AddShape(msoShapeRectangle, plotArea.InsideLeft, plotArea.InsideTop, plotArea.InsideWidth, plotArea.InsideHeight)
    shape.Fill.Transparency = 1
    shape.Line.DashStyle = msoLineDashDot
python
#下例显示 Sheet1 上的第一个图表绘图区内部宽度
def test():
    plotArea = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.PlotArea
    print(plotArea.InsideWidth)