This is because you’re modifying the mystring value yourself, you shouldn’t be doing += which I believe acts like append in AS2, instead you should simply return mystring + “%”

 


From: [email protected] [mailto:[email protected]] On Behalf Of jrab2999
Sent: Friday, October 07, 2005 4:45 AM
To: [email protected]
Subject: [flexcoders] Strange behaviour when using a label func in barchart

 

Hello,

if I use a labeling function for the horizontal axis within the
BarChart component, it labels in a strange way.

The axis is defined like this:
<mx:horizontalAxisRenderer><mx:AxisRenderer canDropLabels="true"
tickLength="1" tickPlacement="inside" labelGap="0"
labelFunction="strPercent">....


I found out only checking if label isn't already modified in the
labeling function brings the needed result (1 time %):

function strPercent(mystring) {
   if (mystring.lastIndexOf("%")==-1) mystring += "%";
   return mystring;
}

Any ideas why it labels multiple times?






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to