2011-10-27 31 views

回答

1

那麼這裏是一個簡單的例子,基於Adobe LiveDocs中:

要小心,雖然,有在Flex中AreaSeries導致這樣一系列工具提示unproperly渲染的錯誤。檢測AreaSeries顯示其高的值(這是正確的)的項目的值yField,但它顯示出相同的值的低的值(線2058和AreaSeries.as 2083)...

enter image description here

<?xml version="1.0"?> 

<fx:Script> 
    <![CDATA[ 

    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 } ]); 
    ]]> 
</fx:Script> 

<fx:Declarations> 
    <mx:SolidColor id="sc3" color="green" alpha=".3"/> 
</fx:Declarations> 

    <mx:AreaChart id="Areachart" height="100%" width="100%" 
     paddingLeft="5" paddingRight="5" 
     showDataTips="true" dataProvider="{expensesAC}"> 

     <mx:horizontalAxis> 
      <mx:CategoryAxis categoryField="Month"/> 
     </mx:horizontalAxis> 

     <mx:series> 
      <mx:AreaSeries 
       yField="Profit" 
       minField="Expenses" 
       areaFill="{sc3}"/> 
     </mx:series> 
    </mx:AreaChart> 

+0

感謝很多人,這正是我需要的。對不起,我直到現在纔回復。你可以看到我在[這裏]結束了什麼(http://stackoverflow.com/questions/7923954/finished-break-even-areachart-but-can-investors-understand-it)。 –