I have a set of data like the following:
[Bindable]
public var Loc:ArrayCollection = new ArrayCollection([
{date:"2002", close:41.87, loc: "Location 01"},
{date:"2003", close:45.74, loc: "Location 01"},
{date:"2004", close:42.77, loc: "Location 01"},
{date:"2005", close:48.06, loc: "Location 01"},
{date:"2006", close:48.06, loc: "Location 01"},
{date:"2002", close:157.59, loc: "Location 02"},
{date:"2003", close:160.3, loc: "Location 02"},
{date:"2004", close:150.71, loc: "Location 02"},
{date:"2005", close:156.88, loc: "Location 02"},
]);
and I'd like to create a chart like the following, in which each location is displayed in different color and grouped by each year:
I was thinking that I must use "mx:ColumnSeries" tag and use its "filterFunction" property to define how to filter the data for each location as a separate series, but I don't know how to do that. Does anyboy have any recommendation or sample code for creating such charts? Thank you
Here an example:
And: