Skip to content
本页内容

Explosion (属性)

返回或设置饼图或圆环图的扇区的分离程度值。如果没有分离,则返回 0(零),即扇区的中心与饼图中心重合。int 型,可读写。

示例

python
#此示例设置 Chart1 中第二个点的分离值。此示例应在饼图上运行
def test():
    point = Application.Charts.Item("Chart1").ChartObjects(1).Chart.SeriesCollection(1).Points(2)
    point.Explosion = 20
python
#此示例判断活动工作表第一个图表上第二个数据点是否分离
def test():
    Application.ActiveSheet.ChartObjects(1).Activate()
    point = ActiveChart.SeriesCollection(1).Points(2)
    if point.Explosion > 0:
        print("数据点已分离")
    else:
        print("数据点未分离")