0 Replies Latest reply on Feb 3, 2010 7:29 AM by JonoB

    Chart animation

    JonoB

      I'm creating chart series in AS, which is working fine. However, the animation doesnt seem to work.

       

      private function createChart():void {
         
          var mySeries:Array = new Array();
          var myInterpolate:SeriesInterpolate = new SeriesInterpolate();
          myInterpolate.duration = 1000;
                                 
          for(var item:String in model.bank_summary_chart[0]) {
              if (item != 'date_trans') {                   
                  var myLineSeries:LineSeries = new LineSeries();
                  myLineSeries.yField = item;
                  myLineSeries.xField = 'date_trans';
                  myLineSeries.displayName = item;
                  myLineSeries.setStyle('form','curve');
                  myLineSeries.setStyle('showDataEffect', myInterpolate);    // This line doesnt work at all                   
                  mySeries.push(myLineSeries);
              }
          }
          myChart.invalidateSeriesStyles();
          myChart.series = mySeries;
          callLater(setDataProvider);
      }                 

       


      private function setDataProvider():void {
          myChart.dataProvider = model.bank_summary_chart;
      }

       

      Am I missing something really obvious here?