Thank you Sherif. 

For now, I solved it with a ColdFusion function and a Flex fillFunction 

private function myFillFunction(element:ChartItem, index:Number):IFill {
        
        var item:PlotSeriesItem = PlotSeriesItem(element);
                
                        var randColor:SolidColor = new 
SolidColor(element.item.color);
                
            return randColor;
    }


--- In [email protected], Sherif Abdou <[EMAIL PROTECTED]> wrote:
>
> You will have to wait until full Flex 3 Version comes out since the
charting source code is not avaliable. 
> 
> 
> ----- Original Message ----
> From: nasawebguy <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Tuesday, February 5, 2008 7:51:23 PM
> Subject: [flexcoders] Re: generate unique colors for per-item fill
> 
> Do you know where the class is stored in Flex 3 Plugin? It was
> halodefaults. as, apparently in Flex 2, but I can't find it in Flex 3?
> 
> I'll look into Math.random suggestion. Thank you!
> 
> Don
> 
> --- In [EMAIL PROTECTED] ups.com, Sherif Abdou <sherif626@ ..> wrote:
> >
> > why dont u just take a look at the class and see how they do it and
> u can always use Math.random( ) to give random colors. The way i seen
> it done in everybook is just Math.random( )*0xFFFFFF
> > 
> > ----- Original Message ----
> > From: nasawebguy <dkerr@>
> > To: [EMAIL PROTECTED] ups.com
> > Sent: Monday, February 4, 2008 4:24:36 PM
> > Subject: [flexcoders] generate unique colors for per-item fill
> > 
> > How do I generate a list of unique colors dynamically in AS? similar
> > to how Flex does in default charts, except in a per-item fill
scenario?
> > 
> > CONTEXT
> > I want to color code an Hlist of categories to match the dot colors in
> > a per-item filled Plot Series.
> > 
> > I have an arrayCollection dataProvider that is a list of categories
> > [categoryid, category] . (number of categories is unknown/unlimited) .
> > I'd like to generate a unique color number corresponding to each
> > category in the array and update that arrayCollection with the
> > generated color numbers.[categoryid ,category, color]
> > 
> > I'd like to use this resulting [categoryid, category, color]
> > arrayCollection as a dataProvider to a horizontalList (dynamic legend
> > list) and a PlotChart per-item fill (Ifill) to color code the dots for
> > each category. User clicks on a color/cat in Hlist, filters the dots
> > for the selected category. Colors in the Hlist match the corresponding
> > colors in the plotchart.
> > 
> > I know how to color code the horizontalList, build the fillFunction,
> > and do the filterFunction. ..
> > 
> > but I don't know how to generate the unique colors (much like Flex
> > does for the default colors in charts) in a per-item fill scenario.
> > 
> > I'm assuming I'd loop through the arrayCollection of categories and
> > update the color dynamically using some color generator? The colors
> > need to be as unique as possible.
> > 
> > It would be cool if I could somehow use Flex's built-in default unique
> > colors for chart series in the per-item fill case?
> > 
> > I could create a color column in the category table in the database,
> > and store colors there for each one, but seems to me that AS might be
> > a better approach.
> > 
> > Thanks!
> > Don
> > 
> > 
> > 
> > 
> > 
> > 
> ____________ _________ _________ _________ _________ _________ _
> > Be a better friend, newshound, and 
> > know-it-all with Yahoo! Mobile. Try it now. 
> http://mobile. yahoo.com/ ;_ylt=Ahu06i62sR 8HDtDypao8Wcj9tA cJ
> >
> 
> 
> 
> 
> 
>      
____________________________________________________________________________________
> Looking for last minute shopping deals?  
> Find them fast with Yahoo! Search. 
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>


Reply via email to