April 2006
Beginner
1114 pages
98h 16m
English
series.Explosion [= setting]
For pie and doughnut chart types, sets or returns the amount to move the series out from the center (exploded view) as a percentage of the diameter of the chart. The following code explodes one piece out of a pie chart:
Sub ExplodeSlice( )
Dim chrt As Chart, sr As Series
' Get a chart.
Set chrt = ActiveChart
chrt.ChartType = xlLine
' Get first series
Set sr = chrt.SeriesCollection(1)
' Use a pie chart type.
sr.ChartType = xlPie
' Keep pie together
sr.Explosion = 0
' Explode last piece.
sr.Points(sr.Points.Count).Explosion = 50
End SubRead now
Unlock full access