3 Replies Latest reply on Jan 11, 2011 3:59 AM by jfb00

    BubbleSeries dataprovider issue

    Tanu Jain Level 2

      BubbleSeries expects a dataprovider of following kind:

      [Bindable] public var expenses1:ArrayCollection = new ArrayCollection([   
                      { Profit:22, Expenses:12, Amount:10},
                      { Profit:12, Expenses:22, Amount:30},
                      { Profit:11, Expenses:19, Amount:30}]);
      for a

       

                <mx:BubbleChart id="bubbleChart" width="100%" height="100%" showDataTips="true" >
                             <mx:series>
                                 <mx:BubbleSeries  id="bubbleSeries" dataProvider="{expenses1}"
                                        showDataEffect="{seriesEffect}"
                                        xField="Profit" yField="Expenses" radiusField="Amount"                            
                                        />
                             </mx:series>
                 </mx:BubbleChart>

       

      What happens when either of Profit or Expenses or both has ''(blank) values? How does chart render these ?

       

      I tried with following cases and got different results. Sometimes it considers blank value as 0 and draws the bubble. Othertimes it doesnt consider them as 0 and doesnt draw the bubble.

       

      Examples:

       

                   

       

                  [Bindable] public var expenses1:ArrayCollection = new ArrayCollection([
                      { Profit:'', Expenses:'', Amount:10},
                      { Profit:12, Expenses:'', Amount:30}]);
                  //Draws two bubbles at (0,0) and (12,0). Considers blank values as 0.
                 
                  [Bindable] public var expenses1:ArrayCollection = new ArrayCollection([
                      { Profit:22, Expenses:12, Amount:10},
                      { Profit:12, Expenses:'', Amount:30}]);   
                  //Draws single bubble at (22,12). Does not consider blank y-value for drawing bubble           
                     
                  [Bindable] public var expenses1:ArrayCollection = new ArrayCollection([
                      { Profit:22, Expenses:12, Amount:10},
                      { Profit:'', Expenses:22, Amount:30}]);
                  //Draws single bubble at (22,12). Does not consider blank x-value for drawing bubble
                     
                  [Bindable] public var expenses1:ArrayCollection = new ArrayCollection([   
                  { Profit:25, Expenses:'', Amount:30},
                  { Profit:'', Expenses:11, Amount:30}]);           
                  //draws one bubble @ (25,0). Does not consider 2nd item as valid-blank x-value
                 
                  [Bindable] public var expenses1:ArrayCollection = new ArrayCollection([   
                      { Profit:22, Expenses:12, Amount:10},
                      { Profit:'', Expenses:22, Amount:30},
                      { Profit:11, Expenses:'', Amount:30}]);
                  //Draws single bubble at (22,12). Does not consider blank x-value,y-value for drawing bubble

       

      I have a huge dataprovider having combinations of blank & non-blank values for X and Y axis fields. I tried using filterFunction, but I need to know the exact behavior first.

       

      Please help.

       

      Thanks,

      Tanu