2011-04-15 70 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