Using SeriesInterpolate : SeriesInterpolate « Chart « Flex






Using SeriesInterpolate

Using SeriesInterpolate
          

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="initTimer()">

    <mx:Script>
        
            import mx.collections.ArrayCollection;
            
            [Bindable]
            public var myCollection:ArrayCollection = new ArrayCollection();
            
            public function initTimer():void
            {
                var myTimer:Timer = new Timer(1000, 0);
                myTimer.addEventListener(TimerEvent.TIMER, timerHandler);
                myTimer.start();
            }
            
            public function timerHandler(event:TimerEvent):void
            {
                var o:Object = {};
                o.number = Math.random() * 100;
                myCollection.addItem(o);
            }
            
      
    </mx:Script>
    
    <mx:SeriesInterpolate id="interpolateIn" duration="500" />
    
    <mx:ColumnChart id="column" height="100%" width="100%" dataProvider="{myCollection}">
        
        <mx:series>
            <mx:ColumnSeries yField="number" showDataEffect="{interpolateIn}" />
        </mx:series>
        
    </mx:ColumnChart>
    
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  








Related examples in the same category