Well, the solution I came up with isn't great, but it does work.  You'll
need to copy PieSeries.as, PieSeriesItem.as and WedgeItemRenderer.as into
your own project and rename them.  I named them FullPieSeries.as,
FullPieSeriesItem.as and FullWedgeItemRenderer.as.  Easiest thing to do is
put them all in the same package so they can find each other, avoiding
imports.  I'm going to assume you do that.  If not, you'll need to fix your
imports.

Unfortunately, since the charting classes are part of the Pro version, I
don't think I can just post attachments of the new files here.  If someone
from Adobe wants to give an okay, I will.

Otherwise, we'll just have to go step-by-step.

Comment out
  include "../../core/Version.as";
in all files.

*
**FullPieSeries.as:
*
Change all references from PieSeries to FullPieSeries

Change all references from PieSeriesItem to FullPieSeriesItem

Change all the references to WedgeItemRenderer to FullWedgeItemRenderer.

Comment out
  import flash.filters.DropShadowFilter;

Comment out
  import mx.charts.renderers.WedgeItemRenderer;

Change
  include "../styles/metadata/ItemRendererStyles.as"
  include "../styles/metadata/TextStyles.as"
to
  include "C:/Program Files/Adobe/Flex Builder
3/sdks/3.0.0/fbpro/projects/datavisualization/src/mx/charts/styles/metadata/ItemRendererStyles.as"
  include "C:/Program Files/Adobe/Flex Builder
3/sdks/3.0.0/fbpro/projects/datavisualization/src/mx/charts/styles/metadata/TextStyles.as"
Or whatever is appropriate to your setup.

Comment out
    filters = [ new DropShadowFilter(DROP_SHADOW_SIZE, 45, 0, 60,
                                         DROP_SHADOW_SIZE, DROP_SHADOW_SIZE)
];

Change
          _radiusInPixelsAfterLabels = dataTransform.radius -
DROP_SHADOW_SIZE;
to
        if (instanceFactory && instanceFactory.generator ==
FullWedgeItemRenderer)
          _radiusInPixelsAfterLabels = dataTransform.radius
        else
          _radiusInPixelsAfterLabels = dataTransform.radius -
DROP_SHADOW_SIZE;



*FullPieSeriesItem.as:
*
Comment out
  import mx.charts.series.PieSeries;

Change all references from PieSeriesItem to FullPieSeriesItem

Change all references to PieSeries to FullPieSeries.



*FullWedgeItemRenderer.as:**
*
Change all the references to WedgeItemRenderer to FullWedgeItemRenderer.

Change all references from PieSeriesItem to FullPieSeriesItem

Comment out
  private static const SHADOW_INSET:Number = 8;

Change
    if (stroke && !isNaN(stroke.weight))
      outerRadius -= Math.max(stroke.weight/2,SHADOW_INSET);
    else
      outerRadius -= SHADOW_INSET;
to
    if (stroke && !isNaN(stroke.weight))
      outerRadius -= stroke.weight/2;


Hopefully, I didn't leave anything out.  If this doesn't work, let me know.

Now, you may notice something.  The FullPieSeries is set up to handle having
no drop shadow by default, using the FullWedgeItemRenderer renderer.  But if
you wanted, you could set the filter back to a drop shadow and set the item
renderer to WedgeItemRenderer.  You'd then get a drop shadow, even with
FullPieSeries.  But if you don't change anything else and just use
FullPieSeries, the pie will go all the way to the sides.

Hope this helps!


On Wed, Aug 27, 2008 at 10:14 AM, lynxoid7 <[EMAIL PROTECTED]>wrote:

>   Jason,
> I have run into the same problem, but haven't come up with a solution.
> Have you resolved it in some way?
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, "Pan
> Troglodytes"
>
> <[EMAIL PROTECTED]> wrote:
> >
> > I'm trying to get a pie that takes up the full height and width of
> the given
> > PieChart element. Unfortunately, it seems the piechart always puts in a
> > border to allow for the drop shadow. I've traced this down to a bit in
> > WedgeItemRenderer's that updateDisplayList that always uses SHADOW_INSET
> > and, worse yet, a bit in PieSeries' updateTransform that always uses
> > DROP_SHADOW_SIZE.
> >
> > Am I missing something, or is this a limitation of the way the chart has
> > been coded? Unfortunately, since the code is entangled in a bunch of
> > private stuff, I can't just override those functions and fix it. I'd
> > basically have to duplicate the units and remove those bits.
> >
> > --
> > Jason
> >
>
>  
>



-- 
Jason

Reply via email to