Dear all
Am developing a dashboard which sizes a series of pie charts according to 1 set of variables. the contents of the pies are set from a second set of variables.
To set the pie diameter I use a routine earlier in the code which calculates the radius "P1R" where the center line of the chart is defined as "P1C". and the horizontal bottom of the chart sits on a line I name "xvert". I then size the chart using the following code:
However this only sets the overall chart size, so I then set the plot area. to do this is send top left to 0,0, and discovered if I stretched the pie beyond the bounds, it sizes to the chart area set above, so the following code should work (I set the pie to 10000 as a notional figure way larger than the chart area). The values are also passed from an array populated from earlier in the routine:
for some reason this is not working correctly on every occasion. I seem to have an inset sometimes from the edge of the chart area. Can anyone point me in the right direction on this one?
Many thanks in advance
Simon
Am developing a dashboard which sizes a series of pie charts according to 1 set of variables. the contents of the pies are set from a second set of variables.
To set the pie diameter I use a routine earlier in the code which calculates the radius "P1R" where the center line of the chart is defined as "P1C". and the horizontal bottom of the chart sits on a line I name "xvert". I then size the chart using the following code:
Code:
With ActiveSheet.ChartObjects(1)
.Top = xvert - (p1r * 2)
.Left = p1c - p1r
.Width = p1r * 2
.Height = p1r * 2
.Activate
End With
Code:
ActiveChart.FullSeriesCollection(1).Values = pie1
ActiveChart.PlotArea.Select
With Selection
.Top = 0
.Left = 0
.Width = 10000
.Height = 10000
End With
Many thanks in advance
Simon