I solved it via ColdFusion server-side for now. Thanks anyway.

Don



--- In flexcoders@yahoogroups.com, "nasawebguy" <[EMAIL PROTECTED]> wrote:
>
> I have an existing arrayCollection coming in that looks like:
> 
> id,mydate,type,...
> 1,1/1/2008,type1
> 2,1/2/2008,type2
> 3,1/7/2008,type3
> 4,1/7/2008,type1
> 5,1/8/2008,type2
> ...
> 
> This is a dataProvider for a dataGrid.
> 
> What I'd like to do is create a new dataProvider for a chart, based on
> this existing data.
> 
> I need to count the number of each type for each week resulting in a
> new ArrayCollection
> 
> weekending, type, count
> 1/7/2008,type1,10
> 1/7/2008,type2,5
> 
> My chart would display
> Yaxis Number(OfEachType)
> Xaxis WeekEndingDate
> 
> I'd like 3 series (type1,type2,type3) so I can fill colors for each
type.
> 
> I'd prefer not the have to query the database again to produce an
> ArrayCollection dataProvider for the chart. There are some complicated
> SQL options for this, but I was wondering if Flex offered an easier
> way for me to do this so I only make one trip to the database.
> 
> I know how to loop through an arraycollection and how to produce a new
> dataProvider, but I don't know how to handle converting/grouping the
> dates by weekending date in the new ArrayCollection.
> 
> Any assistance would be appreciated.
> 
> Thanks,
> Don
>


Reply via email to