Things have moved around a bit.
1) set the labelFunction on the LinearAxis, not the AxisRenderer
2) your LabelFunction should look like:
Public function
defineLabel(value:Number,previousValue:Number,axis:LinearAxis) {
}
I don't think reverse axis is on any future plans list, but future chart
plans are very infirm.
I'll make a note of the request, but you should submit it here:
http://www.macromedia.com/cfusion/mmform/index.cfm?name=wishform
Ely.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of yaagcur
Sent: Friday, November 11, 2005 8:17 AM
To: [email protected]
Subject: [flexcoders] Re: Reverse yaxis (FLEX 2)
Importance: High
Thanks Ely for the hack
The pre-multiplying is straightforward and combined with adding
<mx:LinearAxis minimum="-22" maximum="-1"/> gives me the chart I am
looking for but the axis looks a bit tacky with all the negative numbers
However, I am having trouble appling a labelFunction Attempting to adapt
the example in livedocs
http://livedocs.macromedia.com/labs/1/flex/00001287.html
public function defineLabel(catName:String):String {
return catName + " '04";
}
getting an error
Type Coersion failed: cannot convert 22 to String
I have played around with bringing the data across both as a string and
a number but cannot seem to get it right -even get the same error when
brought in as number and replace string with number as to instances
above
e.g.
public function makePositive(catName:Number):Number {
return -1*catName;
}
Incidentally, do you know if therr are there plans to incorporate a
reverse axis option in later releases or somewhere I could add it to a
wish list
--- In [email protected], "Ely Greenfield" <[EMAIL PROTECTED]>
wrote:
>
>
>
> No, the axes don't really support inversion.
>
> The easiest way would probably be:
>
> 1) pre-multiply your values by -1.
> 2) put a labelFunction on your vertical AxisRenderer that multiplies
> the label value by -1 to make it look like it's positive.
> 3) if you want datatips, you'll have to add a dataTipFunction to do
> the same.
>
> Ely.
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
> On Behalf Of yaagcur
> Sent: Friday, November 04, 2005 9:24 AM
> To: [email protected]
> Subject: [flexcoders] Reverse yaxis (FLEX 2)
> Importance: High
>
> I want to do a chart which is a ranking of team's position (y axis) in
> a league over time (x-axis).
> I would like to reverse the y axis so that if a team is improving over
> time (say from rank 4 to rank 2) the graph shows an upward movement
> rather than the downward movement that results from a straight input
> of the data Unsurprisngly, just having a lower maximum than minimum in
> the LinearAxis does not do the trick Is this possible another way?
>
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> Get Bzzzy! (real tools to help you find a
> job). Welcome to the Sweet Life.
> http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
> --------------------------------------------------------------------~-
> >
>
> --
> 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
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet
Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
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
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
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/