Chart Flex


    
    xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
    creationComplete="initApp()" height="600">
     
        import mx.collections.*; 
        // Define data provider array for the chart data. 
        [Bindable] 
        public var dataSet:ArrayCollection; 
        // Define the number of elements in the array. 
        public var dsLength:Number = 10; 
        public function initApp():void { 
            // Initialize data provider array. 
            dataSet = new ArrayCollection(genData()); 
        } 
        public function genData():Array { 
            var result:Array = []; 
            for (var i:int=0;i                var localVals:Object = { 
                    valueA:Math.random()*100, 
                    valueB:Math.random()*100, 
                    valueX:Math.random()*100, 
                    valueY:Math.random()*100 
                }; 
                // Push new object onto the data array. 
                result.push(localVals); 
            } 
            return result; 
        } 
      

    
        
    

    
        
            
        

                    showDataTips="true">
            
                                    displayName="Series 1" />
                                    displayName="Series 2" />