4 Replies Latest reply on Jun 4, 2009 2:09 PM by drschwartz

    setting dataProvider


      I'm trying to change the data displayed in a ColumnChart when the user changes the value in a DateField. I initialize the fromDateValue varaible and then compare it to the current value in the DateField control. When it's different, I attempt to update the chart's dataProvider.


               // Event handler for the DateField change event.
               private function dateChanged(date:Date):void {
                  if (date == null)
                      Alert.show('date == null');               
                       if (fromDate.text != fromDateValue) {
                         podcastCategoryChart.dataProvider= "{podcastCategories02}";


         <mx:Array id="podcastCategories02">
              <mx:Object data="3" label ="Comedy"/>
              <mx:Object data="0" label ="Debate" />
              <mx:Object data="4" label ="Design" />
              <mx:Object data="4" label ="Magazine" />
              <mx:Object data="3" label ="Science" />
              <mx:Object data="3" label ="Self-Help" />
              <mx:Object data="8" label ="Technology" />



      Unforunately, the result of doing this is that all but the fromDate dropdown control freezes. The fromDate DateField text doesn't update, but the dropdown is displayed.


      Is there a better way of updating dataProviders?