Flex中LineChart

关键点是数据源的设置,可以设置为动态的数据源,从外界读取信息,然后进行绑定,以及设置相应的属性值,坐标值.

.mxml文件

mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

   import mx.collections.ArrayCollection;
  [Bindable]

          //可以设置相应的动态数据源
          private var expensesAC:ArrayCollection = new ArrayCollection( [
            { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
            { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
            { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
            { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
            { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
 ]]>

 
  
  
  
  

  
   
    
     
    

    
     
    

   

  

   
    
    
    
   

  

  
 

 

你可能感兴趣的:(Flex中LineChart)