Chart Flex

tag." src="http://www.rntsoft.com/Code/FlexImages/DefineacustomcomponentinlinebyusingthefxComponenttag.PNG"

               

    
    xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
    initialize="setupDP()" width="550" height="600">
     
         
        import mx.collections.ArrayCollection; 
        import mx.charts.ColumnChart; 
        [Bindable] 
        private var ac:ArrayCollection; 
        public function setupDP():void{ 
            ac = new ArrayCollection([ 
                [ "Label 1 is short.", 200000], 
                [ "Label 2 is a fairly long label.", 150000], 
                [ "Label 3 is an extremely long label. It contains 95 characters and will likely be truncated.", 40000] 
        ]); 
        } 
      
    

    
        
    

    
        
            
        

                    dataProvider="{ac}">
            
                
            

            
                
            

            
                                    categoryField="0" />
            

            
                
                    
                        
                            
                                 
                                    [Bindable] 
                                    private var myTip:String; 
                                    override public function set data(value:Object):void{ 
                                        if(value == null) 
                                            return; 
                                            myTip = value.text; 
                                            var length:int = value.text.toString().length; 
                                            if (length > 20) { 
                                                text = value.text.toString().substr(0, 20) + "..."; 
                                            } else { 
                                                text = value.text; 
                                            } 
                                    } 
                                  

                            
                        

                    

                
            

            
                
            

        
                    text="Hover over the horizontal axis's labels to see the entire title rendered as a ToolTip." />