/** * 鼠标移过图形 */ protected function itemRollOverHandler(event:ChartItemEvent):void { var pSI:PieSeriesItem = event.hitData.chartItem as PieSeriesItem; var rg:RadialGradient = pSI.fill as RadialGradient; var arr:Array = rg.entries; trace(arr[0]) if (myTip) { myTip.text = s; myTip.x = chart.localToGlobal(point).x; myTip.y = chart.localToGlobal(point).y; } else { myTip = ToolTipManager.createToolTip(s, chart.localToGlobal(point).x, chart.localToGlobal(point).y, "errorTipAbove", IUIComponent(event.currentTarget)) as ToolTip; } myTip.visible = true; }
完整代码见: