1 Reply Latest reply on Apr 17, 2008 12:50 AM by BaliHi

    Problem dynamic binding pieChart to ArrayCollection

    ChrisBAH1008
      Rather than bind my pieChart to a static array or arraycollection, like most examples show...I want to bind the pieChart via dataProvider to an ArrayCollection populated via an HTTPService.

      My chart result handler is:
      public function chartResultHandler(event:ResultEvent):void
      {
      eventTaskChartAC = event.result.DATAROOT.DATAITEM as ArrayCollection;
      }

      Each DATAITEM should contain a NUM and a STATUS. Thus, my MXML looks as follows:
      <mx:PieChart id="taskOverviewChart" height="60%" width="80%" dataProvider="{eventTaskChartAC}"
      showDataTips="true">
      <mx:series>
      <mx:PieSeries
      labelField="STATUS"
      field="NUM"
      labelPosition="callout"/>
      </mx:series>
      </mx:PieChart>

      However, despite the fact that the HTTPService is getting called properly and the data returned is in the proper format, the chart fails to appear.

      Can anyone guide me in the right direction?

      Thanks.