Or as Tim said, you could also uses this
private function toolTipReport(e:HitData):String { var relatorioTip:String = ""; relatorioTip += "<b>Custom Label:</b> "+e.item.col_1+"<br>"; relatorioTip += "<b>Custom Label2:</b> "+ e.item.col_2 + "<br>"; relatorioTip +="<b>Custom Label3:</b> " + e.item.col_3+"<br>"; relatorioTip +="<b>Custom Label4:</b> "+e.item.col_5+ "<br>"; relatorioTip += "<b>Custom Label 5:</b> " + e.item.col_6+ "<br>"; relatorioTip += "<b>Custom Label 6:</b> " + e.item.col_7; return relatorioTip; } On 11/18/06, Tim Hoff <[EMAIL PROTECTED]> wrote:
Patrick, Sorry to highjack your thread. Here's a method to display a multi-lined Axis label: *labelFunction: *public function wrapLabel (cat:Object,pcat:Object,ax:CategoryAxis,catItem:Object):String { var pattern:RegExp = /-/; return cat.replace(pattern, "-\n"); } *Axis:* <mx:horizontalAxis> <mx:CategoryAxis categoryField="CategoryField" labelFunction=" wrapLabel"/> </mx:horizontalAxis> This example changes: 11/17/06 - 12/16/06 to 11/17/06 - 12/16/06 By using regular expresions, you have quite a bit of flexibility. -TH __________________________________ *Tim Hoff *Cynergy Systems, Inc. http://www.cynergysystems.com <http://www.cynergysystems.comoffice/> Office: 866-CYNERGY --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > Thanks Ely, that makes sense now. I'll give it a try. Luckily, both > series are using the same dataProvider, so I'll have access to the data > property and probably be able to eliminate the second axis completely. > Thanks for the tips and the source to your interactive calendar > component > <http://www.quietlyscheming.com/blog/components/interactive-calendar/> . > Great Stuff! > > -TH > > --- In flexcoders@yahoogroups.com, "Ely Greenfield" egreenfi@ > wrote: > > > > > > > > > > Hi Tim. yes, the AxisRenderer supports a property called > > 'labelRenderer' which is very much like an item renderer. Pass the > > AxisRenderer a reference to a class (wrapped in a classFactory, just > as > > with itemRenderers) that extends UIComponent, ProgrammaticSkin, or one > > of the existing Flex components, and implements the IDataRenderer > > interface. The AxisRenderer will instantiate one of these for each > > label it needs to show, and assign the label to the labelRenderer's > > 'data' property. > > > > I don't think there are any examples out there of how to do this > today. > > > > Ely. > > > > > > p.s. You could also consider writing a custom axisRenderer...there's a > > pretty exhaustive example of how to do that in the Interactive Bubble > > Chart on my blog, http://www.quietlyscheming.com/. You could > > theoretically create two axis renderers that stack on the left hand > side > > that way, although that's a pretty big undertaking. > > > > > > > > > > ________________________________ > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > On > > Behalf Of Tim Hoff > > Sent: Friday, November 17, 2006 3:37 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Re: Ely: How do you wordwrap a label on a bar > > chart? > > > > > > > > Hi Ely, > > > > I got this far with wordwrapping the label text, but my question is > > more complicated. I want to have two verticalAxisRenderers, side-by- > > side, on the same side of a ColumnChart. Or, create a single > > LabelRenderer to simulate this. One of the labels needs a shaded > > background with text, while the other is just text. While digging > > into it, the docs say to use IFactory for a chart LabelRenderer. Is > > this similar to an ItemRenderer for a DataGrid? Understandably, > > there aren't any examples yet that show how to do this. > > > > If you have the time, thanks, > > -TH > > > > --- In flexcoders@yahoogroups.com, "Ely Greenfield" egreenfi@ > > wrote: > > > > > > > > > > > > Hi Patrick. THe only way would be to use a labelFunction on your > axis > > > and manually insert a line break yourself. > > > > > > Ely. > > > > > > > > > ________________________________ > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > > On > > > Behalf Of dj > > > Sent: Friday, November 17, 2006 2:34 PM > > > To: flexcoders@yahoogroups.com > > > Subject: [flexcoders] Ely: How do you wordwrap a label on a bar > chart? > > > > > > > > > > > > A Vertical Axis why Field, my labels are being cut off, my width > > > dimension is fixed to 280 pixels, so the column needs to wrap down? > > > > > > Thanks, > > > Patrick > > > > > >
-- ---------------------------- Igor Costa www.igorcosta.com