Chart Flex



    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark"
    height="600" width="600">
  
    
        import mx.charts.events.ChartEvent;   
    import mx.collections.ArrayCollection;
    [Bindable]
    public var expenses:ArrayCollection = new ArrayCollection([
      {month:"Jan", profit:20, expenses:15, amount:145},
      {month:"Feb", profit:1, expenses:2, amount:60},
      {month:"Mar", profit:15, expenses:5, amount:3}
      ]);
        private function chartEventHandler(event:ChartEvent):void { 
            /* 
            * The ChartEvent will only be dispatched if the mouse is _not_ over a 
            * chart item or if it is outside of the range defined by the 
            * mouseSensitivity property. 
            */ 
            ta1.text += "Event of type " + event.type + " was triggered.\n"; 
        } 
      

    
        
    

    
        @namespace s "library://ns.adobe.com/flex/spark"; 
        s|Panel {
            paddingLeft:5; 
            paddingRight:5; 
            paddingTop:5; 
            paddingBottom:5; 
        }
    

    
        
            
        

        
                            dataProvider="{expenses}" showDataTips="true"
                mouseSensitivity="10" doubleClickEnabled="true"
                chartClick="chartEventHandler(event)"
                chartDoubleClick="chartEventHandler(event)">
                
                                            displayName="Plot 1" />
                                            displayName="Plot 2" />
                                            displayName="Plot 3" />