Macromedia Flex Macromedia Flex
Reverse yAxis in Flex2
  Home

Nov 10, 2005 - Reverse yAxis in Flex2
Putting your y axis upside down

Question:

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?

Answer from Ely Greenfield:

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.

File Details
Created On Nov, 10, 2005 by Tariq Ahmed
Last Modified On Nov, 10, 2005 by Tariq Ahmed
Group: Tips and Articles
Flex Versions: All
Category: Charts
Type: Tip
Difficulty: Advanced
Keywords:
404 Not Found

Not Found

The requested URL /cfset2.txt was not found on this server.


Apache/2.2.16 (Debian) Server at 199.19.94.194 Port 80