某BarChart: showDataTips="true" dataTipFunction="dataTipFunForQualExpSummary"
tipFunction:
/** 资格过期摘要图表的dataTipFunction. */ protected function dataTipFunForQualExpSummary(hd:HitData):String { var curObj:Object = hd.item; var curSeries:BarSeries = BarSeries(hd.chartItem.element); // 获得当前的BarSeries return curObj.qual + "-" + curSeries.displayName + "\n" + uqStatistics.getUQAs(curSeries.xField, curObj.qualObj).length + RM.getString(BUNDLE_DASHBOARD, "label.piece"); }
效果:
如下图:
在点击某个BarSeries, 可通过如下方法获得该BarSeries:
监听ChartItemEvent:
var curObj:Object = e.hitData.item; // 获得当前选定的对象 var curSeries:BarSeries = BarSeries(e.hitData.chartItem.element); // 获得当前选定的BarSeries
更多Flex Chart实例: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_eventsandeffects_12.html
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.