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
}
ANSWER: