3 Replies Latest reply on Oct 25, 2007 7:59 PM by ntsiii

    Adding To ArrayCollection

    GeorgeWS Level 1
      I have a pie chart that get its data from an arrayCollection

      [Bindable]
      public var myChart:ArrayCollection;

      <mx:PieChart id="chart"
      height="100%"
      width="100%"
      dataProvider="{myChart}" showDataTips="true"/>
      <mx:PieSeries field="Quantity" nameField="Brand" labelPosition="callout" labelFunction="displayCat">
      </mx:PieChart>

      The Chart works Geat!
      it displays brands of vodka, where I work we have about 3 vodkas. But I want to show a 4th Pie slice that is the competition.

      I want to add another record into the arrayCollection "myChart". Its Brand would be static "Competition" and the Quantity would come from some other values Im passing in. What would this look like?

      Brand...................... Qty
      KettelOne...............4
      Seagrams..............2
      GreyGoose............5

      Competition..........12

      Any help will be great
      Thanks
      George