3 Replies Latest reply on Sep 8, 2009 5:49 PM by ryanstokes1234

    Error with ArrayCollection


      Hi All,


      Having an error hoping someone can help me! Baiscally I have a chart object and a grid object that is based off of this ArrayCollection that is dynamically created but I cannot get the grid or chart to show the data even though I can see the data is in the list in debug view: My code:


      //Before This I do a lot of ifs and counts to get he total for the month based on an XML Collection then I have:


      { Month:
      "Aug2008", Admitted: amonth1, NotAdmitted: nmonth1, Pending: pmonth1}]);

      My chart and Grid look like this:

      <mx:DataGrid x="536" y="127" dataProvider="{BarData1}">
      <mx:DataGridColumn headerText="Month" dataField="Month"/>
      <mx:DataGridColumn headerText="Admitted" dataField="Admitted" />
      <mx:DataGridColumn headerText="NotAdmitted" dataField="NotAdmitted" />
      <mx:DataGridColumn headerText="Pending" dataField="Pending"/>




      <mx:ColumnChart x="65" y="40" id="columnchart1" dataProvider="{BarData1}">
      <mx:CategoryAxis dataProvider="{BarData1}" categoryField="Month"/>
      <mx:ColumnSeries displayName="Admitted"  dataProvider="{BarData1}" yField="Admitted" xField="Month"/>
      <mx:Legend dataProvider="{columnchart1}" x="10" y="40"/>


      (Sorry not sure how everyone gets code in here?)


      Anyone see what I missed?