Hi Jon. Unfortunately, there's nothing in charts that will do what you want. What you're looking for is basically a pivot (well...if you're looking for just one brand it's a filter, but if you're looking for one series per brand it's more of a pivot), and charts don't support that out of the box.You have three options:1) prefilter the data yourself, the manual way2) subclass lineSeries, add a 'filterField' and 'filterValue' property, and override the updateFilter function to filter on those values.3) write a pivot class that accepts parameters on what to filter on, what to create multiple series on, what to aggregate on, and have it spit out a set of series with custom dataproviders assigned.I've got a skunkworks version of #3 I've been tooling around with for a little while, but it's not ready for the outside world yet. In the meantime, try #1 or #2.Ely.
From: [EMAIL PROTECTED]ups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jonathan Miranda
Sent: Wednesday, October 18, 2006 4:25 PM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] Filters for multiple LineSeries in a LineChart - Calling ChartMan Ely!Heh, maybe he'll see this before MAX :)
Anyways, here's my question - I've done this before, but I can't
remember how nor find the code. I've got a data set like the
following:
Month.....Dollar.....Category.....Brand
..Jan.........500..........IT.............Blue
..Feb.........700..........JO.............Red
..Mar.........600..........AC.............Blue
..Jan.........100..........IT.............Green
..Feb.........200..........JO.............Red
..Mar.........300..........AC.............Blue
ok so, Month will be my x-axis. Dollar will be my y-axis, tallied up.
I want the entire LineChart to filter on Category (assuming I'll just
need to sort this based on altering the dataProvider itself)...but my
problem is I need a LineSeries for each Brand.
So my first guess was....
<mx:series>
..<mx:Array>
....<mx:Repeater dataProvider={uniqueBrandList}>
......<mx:LineSeries .....>
....</mx:Repeater>
..</mx:Array>
</mx:series>
Which does give me the lines I need, but I need some way to have a
LineSeries only show data where brand=uniqueBrandList.selectedItem.
What's the filter mechanism for a LineSeries besides the yField? Is
there some trick in that field or is there a property/function I'm
missing on how I can only show data where Brand=X? I thought "hey, use
filters" but that's the Effects, not for data :)
Any help would be nice....
-Jon Miranda
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Software development tool Software development Software development services Home design software Software development company
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
- RE: [flexcoders] Filters for multiple LineSeries in a Lin... Ely Greenfield
- Re: [flexcoders] Filters for multiple LineSeries in ... Jonathan Miranda
- Re: [flexcoders] Filters for multiple LineSeries... Jonathan Miranda
Reply via email to
Remind me to buy you a drink at MAX :) Thanks Ely, I'll get cracking on subclassing lineSeries I guess since this is pretty elaborate
On 10/19/06, Ely Greenfield
<[EMAIL PROTECTED]> wrote:

