Chart Flex


    
    xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
    creationComplete="initApp()" height="600">
    
                    url="http://aspexamples.adobe.com/chart_examples/testDataPage.html" />
    

     
        import mx.events.FlexEvent; 
        import mx.rpc.events.ResultEvent; 
        import mx.rpc.events.FaultEvent; 
        [Bindable] 
        public var chartData:XMLList; 
        private function initApp():void { 
            serviceInput.addEventListener(ResultEvent.RESULT, resultHandler); 
            serviceInput.addEventListener(FaultEvent.FAULT, faultHandler); 
            serviceInput.send(); 
        } 
        public function resultHandler(evt:Event):void { 
            // Extract the XML data from the HTML page. 
            var htmlBlob:String = serviceInput.lastResult.toString(); 
            htmlBlob = htmlBlob.slice( htmlBlob.indexOf("", 0) +25, htmlBlob.length ); 
            htmlBlob = htmlBlob.slice( 0, htmlBlob.indexOf("", 0) ); 
            // Create an XMLList from the extracted XML data. 
            chartData = new XMLList(htmlBlob); 
        } 
        public function faultHandler(evt:Event):void { 
            trace(evt.toString()); 
        } 
      

    
        
    

    
        
            
        

                    showDataTips="true">