Flex 4,动态图表
我的 Flex 应用程序中有多个饼图,当用户单击其中任何一个饼图楔形时,我使用 perWedgeExplodeRadius 将其拉开并突出显示。非常基本的东西......但现在我希望先前单击的饼图在单击另一个饼图时关闭备份,这就是我遇到问题的地方。如何识别最后一个pieSeries?这就是我所拥有的不起作用。
private var lastChartOpened:PieSeries;
private function pieChart_itemClick(evt:ChartItemEvent):void {
if (lastChartOpened != null) {
PieSeries(lastChartOpened).perWedgeExplodeRadius = arr;
}
lastChartOpened = evt.currentTarget as PieSeries;
trace(lastChartOpened); // comes up as null
}
I have multiple pieCharts in my flex app and when the user clicks a pie wedge in any of them I use the perWedgeExplodeRadius to pull it away and highlight it. Pretty basic stuff... but now i'd like the previously clicked pieChart to close back up when another pieChart is clicked and this is where I'm running into issues. How can I identify the last pieSeries? This is what I have that does not work.
private var lastChartOpened:PieSeries;
private function pieChart_itemClick(evt:ChartItemEvent):void {
if (lastChartOpened != null) {
PieSeries(lastChartOpened).perWedgeExplodeRadius = arr;
}
lastChartOpened = evt.currentTarget as PieSeries;
trace(lastChartOpened); // comes up as null
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案:
ANSWER: