you can check against the series type with e.element; something like: if (e.element is ColumnSeries) { var col:ColumnSeries = ColumnSeries(e.element); return "<b>"+col.name+":</b><br>"+ e.item[col.yField]; } else if (e.element is LineSeries) { ... }
hth, matt horn flex docs > -----Original Message----- > From: flexcoders@yahoogroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of Tom Fitzpatrick > Sent: Thursday, August 03, 2006 12:00 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Datatips on Cartesian chart > > I have a Cartesian chart that contains several column series > and a line series. > > I'm customizing the dataTips for the chart with a simple > dataTipFunction: > > private function buildDataTip(e:HitData):String { var > col:ColumnSeries = ColumnSeries(e.element); return > "<b>"+col.name+":</b><br>"+ e.item[col.yField]; } > > This works fine for the columns - but of course not for the line. > > Within that function, how would I define a separate block of > code to use in creating a custom datatip for the line series? > > - Tom > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/