+1  A: 

What does your data look like in both cases? My guess is that you have series data whose value is 0, which may cause the label to render without any visible slice showing up on the pie chart. Try filtering out data with 0 values or using a custom label function to not display the label if the field value is 0.

(Note this is just a guess)

mweiss
This sort of helped. I looped through the data and removed the data with a count of 0. That fixed the issue with the labels not disappearing. But now for some reason Labels don't show AT ALL for Pie Charts with only one item (ie - 100%). Sigh...
mattdell
+3  A: 

I ran into this problem and it took me a while to figure out a workaround for this bug.

To fix this, I set the PieChart series when the dataProvider's underlying Collection is set and anytime that Collection changes:

<?xml version="1.0" encoding="utf-8"?>
<mx:PieChart xmlns:mx="http://www.adobe.com/2006/mxml"
    dataProvider="{dataForPieChart}">
    <mx:Script>
        <![CDATA[
            import mx.events.CollectionEvent;
            import mx.collections.ArrayCollection;
            import mx.charts.series.PieSeries;

            [Bindable]
            private var _dataForPieChart:ArrayCollection;

            public function set dataForPieChart(value:ArrayCollection):void
            {
                _dataForPieChart = value;

                /* Add a Collection Change Event Listener to the Collection. */
                _dataForPieChart.addEventListener(
                    CollectionEvent.COLLECTION_CHANGE, 
                    dataForPieChart_collectionChangeHandler);

                reloadPieSeries();
            }

            public function get dataForPieChart():ArrayCollection
            {
                return _dataForPieChart;
            }

            private function dataForPieChart_collectionChangeHandler(
                event:CollectionEvent):void
            {
                reloadPieSeries();
            }

            private function reloadPieSeries():void
            {
                series = new PieSeries();

                series.field = "myValue";

                series.labelPosition = "callout";
            }
        ]]>
    </mx:Script>
</mx:PieChart>
Eric Belair
Thanks Eric. I have tried this quite a number of times and tried to tweak it, but I can't get it to work. :(
mattdell
I also wrestled with this bug for more than a whole day, lots of swearing and hair loss included. Eric's idea works, though: The key is to create a new PieSeries every time the SeriesInterpolate animation stops. The bug does not surface if you don't animate the PieChart's changes. There's abug in Adobe's bug tracker at http://bugs.adobe.com/jira/browse/FLEXDMV-1995 - they're fixing it in Flex 4.
Simon
Yup! That's the bug I entered, and apparently it's currently being worked on.
Eric Belair
A: 
A: 

The solution proposed by Eric Belair works great to me, here's my code in the function that updates de data in infoPA, the dataProvider of the PCgrafico PieChart. I hope it can helps if anyone is experiencing this too `infoPA=evt.result.data.infoPA.estado;

  PCgrafico.series=null;
  var vectorSeries:Array=new Array();

  var series:PieSeries=new PieSeries();
        series.field="totalPA";            
  series.nameField="estadoPA";
  series.setStyle("labelPosition", "callout");
        series.setStyle("showDataEffect", effect);
        vectorSeries.push(series);
        PCgrafico.series=vectorSeries;`
Cristian Gómez