Hi Ely, I extended the BarSet class and did a override of formatDataTip function with the functionality that i need.
Thanks for your pointer. -Suri --- In [email protected], "Ely Greenfield" <[EMAIL PROTECTED]> wrote: > > > > Hi Suri. THe totals for the items are stored as part of the grouping > series (i..e, the ColumnSet, BarSet, etc) in an internal variable called > totalsByPrimaryAxis. This variable is protected, so to access it you'll > need to write a custom extension to the class. It's a dictionary, where > the keys are values along the primary axis (the x axis for column/area, > y axis for bar), and the values are the total at that point. > > If you look at ColumnSet.formatDataTip, you can see how the default data > tips are calculated. So you'll want to extend the series to provide > access to the item totals, and then use similar logic from that function > for your own datatips. > > Ely. > > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of suri_boston > Sent: Tuesday, January 16, 2007 10:20 AM > To: [email protected] > Subject: [flexcoders] custom data tip in stacked bar chart > > > > Hi, > I am trying to access the percentage value of the bar to display it > in the custom data tip function with no success.. > private function customDataTip(hd:HitData):String { > > var tmp:BarSeriesItem = new BarSeriesItem(); > var stryValue:String = ""; > tmp = e.chartItem as BarSeriesItem; > var tmpStr:String = ""; > var tbar:BarSeries = BarSeries(e.element); > tmpStr = "<B>" + BarSeries(e.element).displayName + "</B><BR>"; > if(ca.displayName != null && ca.displayName != "") > stryValue = "<I>"+ ca.displayName.toString() + ": </I>"; > stryValue += String(e.item[grpByColumn]); > tmpStr += stryValue+"<BR>"; > > /***** how to get the percentage value??? *****/ > var tbarstack:StackedSeries = tbar.stacker; > /***** how to get the percentage value ???*****/ > > tmpStr += tmp.xValue + tbar.stacker.toString(); > return tmpStr; > } > > Any help? > -Siva >

