2011-04-15 74 views

回答

1

我將如何做到這一點是有圖表組件手柄鼠標移動和retreive在鼠標相對於數據和單個數據點存儲到像mouseOverData屬性,然後將其綁定到另一個組件,就像那個頂級的'tooltip'一樣。下面是扁平組件的示例(扁平化,因爲我將爲每個組件創建單獨的文件以便在項目中重用):

<s:VGroup> 
<s:HGroup> 
<s:Label text="Some Label: {mouseOverData.someProperty}" /> 
<s:Label text="Second Label: {mouseOverData.secondProperty}" /> 
</s:HGroup> 
<mx:LineChart mouseMove="calculateMousePositionRelativeToDataAndStoreInMouseOverDataProp(event)" /> 
</s:VGroup> 
+0

看起來不錯。讓我試一試。 thx – toneb 2011-04-15 16:40:20