I have been trying to figure out a way to create a LineChart that contains numerous LineSeries based off data in an ArrayCollection.
To be more specific, let's say that we have an ArrayCollection as such:
public var myArray:ArrayCollection=new ArrayCollection([{State: "Georgia", Year: "2011", Percent: 18}, {State: "Georgia", Year: "2010", Percent: 10}, {State: "Maryland", Year: "2009", Percent: 15}, {State: "Maryland", Year: "2008", Percent: 15}]);
I want to create a LineChart that contains two lines: one for Georgia and one for Maryland. The line for Georgia would contain 2011 and 2010 data on the single line. The Maryland line would contain 2009 and 2008 data on the single line.
I was thinking that I would probably have to create the LineSeries dynamically, but not sure how to get the ArrayCollection to group the data based off the states.
Any suggestions would be helpful. Thanks