View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.charting
ellen s.
 
Posts: n/a
Default how do i enlarge a pie chart by a fixed percentage?

Hi Andy,
I have no idea what that means. Could you somehow simply the language for
me, or at least show me where to start?

Thanks much!
Ellen

"Andy Pope" wrote:

Hi,

I think you have to resort to code to do this.

Sub x()
'
' enlarge pie plot area by % of current size
'
Dim sngLeft As Single
Dim sngTop As Single
Dim sngWidth As Single

With ActiveChart.PlotArea
sngLeft = .Left
sngTop = .Top
' move to top corner to allow for growth
.Left = 1
.Top = 1
sngWidth = .Width
.Width = sngWidth * 1.2 ' 20% enlargement
.Left = sngLeft + ((sngWidth - .Width) / 2)
.Top = sngTop + ((sngWidth - .Width) / 2)
End With

End Sub

Cheers
Andy

ellen s. wrote:
created a pie chart, and figured out how to drag the corner of plot area to
enlarge the chart size free-hand. how do i increase the chart size by
exactly 20% to show an increase of 20% in total business size over last
year's pie chart?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info