1 Reply Latest reply on Sep 23, 2008 8:12 AM by ANewFlexUser

    Three data sets in a single Flex chart?

      Hello everyone;

      I've successfully integrated two data sets into a single Flex chart; now I'm wondering how to bring in another one. Here's an example of what I'd want to do. Say I wanted to chart average lifespan and average household income by US State. So I'm imagining each state could be represented by a pair of bar charts - one representing lifespan and using the left y axis and one representing income and using the right y axis. The third component would be the state, which the user should be able to display or hide. I'm imagining states being represented by color and a label on the x axis, and user controls to display more or fewer years.

      Any change I could actually pull this off?

      Thanks for any help.
        • 1. Re: Three data sets in a single Flex chart?
          ANewFlexUser Level 1
          I'm not entirely certain where the conflict from adding States would appear, but I'm a little unclear on your data model. Have you considered putting all the information into a single data set? I would suggest filling an Array Collection with a class like this:

          public class infoHolder
          public var lifespan:int;
          public var salary:int;
          public var stateName:string;

          Then you can simply fill your chart like this: