Following is a simplified example of what I'm running into.  Basically,
BubbleSeries doesn't preserve the order of the bubbles when you switch the
dataprovider.  Run the following program and click the left and right
buttons.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical">
  <mx:Script>
    <![CDATA[
      import mx.collections.ArrayCollection;
      [Bindable] public var d:ArrayCollection = new ArrayCollection([
          new ArrayCollection([
            {x:1, y:1, z:10},
            {x:2, y:2, z:20},
            {x:3, y:3, z:30},
            ]),
          new ArrayCollection([
            {x:1, y:1, z:20},
            {x:2, y:2, z:20},
            {x:3, y:3, z:30},
            ])
        ]);

      [Bindable] public var i:int = 0;
    ]]>
  </mx:Script>

  <mx:SeriesInterpolate id="interp" />

  <mx:BubbleChart>
    <mx:series>
      <mx:BubbleSeries id="series1" xField="x" yField="y" radiusField="z"
creationComplete="series1.dataProvider = d[0]" showDataEffect="{interp}">
        <mx:fills>
          <mx:SolidColor color="red"/>
          <mx:SolidColor color="green"/>
          <mx:SolidColor color="blue"/>
        </mx:fills>
      </mx:BubbleSeries>


    </mx:series>
  </mx:BubbleChart>
  <mx:HBox>
    <mx:Button label="&lt;" click="i--; series1.dataProvider = d[i]"
enabled="{i != 0}"/>
    <mx:Button label=">" click="i++; series1.dataProvider = d[i]"
enabled="{i != d.length - 1}"/>
  </mx:HBox>
</mx:Application>

What happens is that the blue bubble swaps places with the green bubble and
then grows to the size of the green bubble.  What I want is for the blue
bubble to just grow in place and have the green bubble stay put.  Is there
some way I'm missing to tell the chart to pay attention to the order of the
data?  I thought maybe it had something to do with transitionRenderData, but
the documentation on it is rather ... brief.

-- 
Jason

Reply via email to