Rotating a pie chart


Posted by Stephen Giles on February 14, 2002 5:49 AM

Does anyone know how to rotate a pie chart?

Posted by JohnG on February 14, 2002 6:32 AM

If you are doing it in Excel right click the pie chart and select format and change the angle of the first slice. The macro for it looks like the following

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2/14/2002 by J Gittins
'

'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Select
With ActiveChart.ChartGroups(1)
.VaryByCategories = True
.FirstSliceAngle = 10
End With
'rotate it again to 20 degrees
With ActiveChart.ChartGroups(1)
.VaryByCategories = True
.FirstSliceAngle = 20
End With
End Sub



Posted by Stephen Giles on February 14, 2002 9:16 AM

Macro1 Macro Macro recorded 2/14/2002 by J Gittins

Many thanks - we'll try this in the morning.

Stephen