You've got two choices. The first, which is a bit of a hack but might be
the easier of the two, would be to write your own code that examines the
data, generates an array of fills whose values match the expected
colors, and assigning that. The more correct method would be to write a
custom item rendere for the wedges that ignores the fills color and
picks the fill color based on a value from the data.
Ely.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jason
Sent: Friday, June 02, 2006 8:40 AM
To: [email protected]
Subject: [flexcoders] Re: dynamic colors for pieseries wedges
No ideas?
--- In [email protected], "Jason" <[EMAIL PROTECTED]> wrote:
>
> I'm having a bit of a time figuring this one out. I have a PieChart
> that I'm using to map data that fits into certain categories. I want
> to always have each category given a fixed color. So, for example, I
> might have categories Normal (green), Warning (yellow) and Error
> (red). I'm throwing different data sets at the chart, sorted by total
> (so the slices will be arranged in order of size). Sometimes this
may be:
>
> Normal: 1
> Warning: 5
> Error: 10
>
> Or
>
> Warning: 1
> Normal: 5
> Error: 2
>
> Or
>
> Error: 1
> Normal: 3
> Warning: 10
>
> Or
>
> Error: 5
> Normal: 10
>
> (note that Warning is missing because it didn't show up)
>
>
> Now, in all these cases, I always want Normal to be green, etc. As
> far as I can tell, you can use a array of solidcolor fills. But it
> only cares about the ordinal position. So say I give it green, yellow
> and red. It will work fine in the first case. But in all the other
> cases, it won't be right because the order is different or some
> elements might be missing.
>
> I'm pretty new to flex so maybe I'm totally missing something.
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Protect your PC from spy ware with award winning anti spy technology.
It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
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
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

