explorers’ club


Conditionally Colored Flex Charts – simplified
Monday, July 14, 2008, 5:06 pm
Filed under: actionScript, development, flex

[Another quick note to myself]

I have always thought of flex developers as being categorized in two camps (at least this has been my experience).  You have the:

  • those who focus on mostly Flex charting and
  • those who focus on everything but Flex charting.

I fall into the latter category.  I just never decided to look into charts.  Everytime I would take a peek at the API I would just shake my head in confusion and focus on other tasks.  Why learn something new today that you can put off till tomorrow (or however that saying goes).  Well a client wants charts and I am the only Flex developer on the project.

Here is a basic breakdown of what the UI is expected to have:

  • comparative data showing columns, each column representing an individual item of like-type.
  • unique colors per item.
  • color will also indicate some status compared to a benchmark indicator.

The idea is to achieve something like this:

Whoo hoo, big deal.  Just another column chart.  Anywho…. so the issue was I was trying to find a way to easily color the columns based on certain conditions ergo a conditionally colored column chart.

I ran across this post (link) where someone had created a ChartItemRenderer subclass.  It seems to work brilliantly, but I had to question if there was not some simpler means to do so.  After much poking around I did indeed find it.  Check out mx:ColumnSeries.fillFunction (link).


2 Comments so far
Leave a comment

[...] – bookmarked by 6 members originally found by kinoshi on 2008-08-10 Conditionally Colored Flex Charts – simplified http://jwopitz.wordpress.com/2008/07/14/conditionally-colored-flex-charts-simplified/ – bookmarked [...]

Pingback by Bookmarks about Basic

Thanks for the example, very useful !!

Comment by Antenatal Screening Professionals




Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>