Duh! this morning it works!
element.item.type
I appreciate the help.
First time I've used breakpoints to gain visibility into a function.
Very useful.
I do have Flex 3 Language Reference and tons of others. But, like a
Shuttle mission, much trial and error..training...and especially
teamwork are required before certification for flight. The manuals on
the shelves and inside PC are even more massive on console. They are
useful. It takes the more experienced engineers to mentor the less
experienced. Teamwork is the essence of flexcoders.
With that said, thanks for the help...
and for expanding my vocabulary too!
http://dictionary.reference.com/browse/didactic :)
Don
--- In flexcoders@yahoogroups.com, "simonjpalmer" <[EMAIL PROTECTED]>
wrote:
>
> If you set a breakpoint in the debugger in your myFillFunction method
> below and you inspect element:ChartItem, what is in the item property?
>
> It should be the object corresponding to that datum in the data
> provider you have attached to the chart. From there you should be
> able to get at whatever you want in your domain model.
>
> Not wishing to sound didactic, but how about having a copy of the Flex
> language reference on your desktop? If you don't already have it as
> part of your install then you should be able to download it from the
> web. If you can't find it send me a message at simon dot palmer at
> gmail dot com and I'll zip it up and send it to you. I find it a real
> shortcut.
>
> I also really recommend spending a day or two poring over the code on
> sites like Ely Greenfield's quietlyscheming.com, Peter Ent's blog at
> Macromedia, Alex Harui's Flex Closet and the flexlib at google. There
> are a million resources free on the web with clever ideas and code
> samples.
>
> Simon
>
> --- In flexcoders@yahoogroups.com, "nasawebguy" wrote:
> >
> > Single Series only
> > I see how to change the color of each data item based on the
> > item.yValue. Very slick. (see my code below).
> >
> > However, I'd like my conditions to be compared to data in my
> > dataProvider for each item, instead of just the yValue. For example,
> > my dataProvider includes "type." type can be one of three strings
> > (type1,type2,type3). If type = 'type1', then use one color, if type2,
> > another...
> >
> > I don't know how to reference it. I know how to use hitData for
> > dataTips, but not in the context of IFill.
> >
> > Can you suggest a mod to code below or a better way to change the
> > color of the circles?
> >
> > Or how to change the itemRenderer shape, in a similar way. Ideally,
> > I'd like the color to indicate yValue, and the shape to indicate type.
> >
> > Thanks,
> > Don
> >
> >
> > private function myFillFunction(element:ChartItem,
index:Number):IFill {
> > var h:SolidColor = new SolidColor(0x00CC00);
> > var m:SolidColor = new SolidColor(0xfbf805);
> > var l:SolidColor = new SolidColor(0xFF);
> > var item:PlotSeriesItem = PlotSeriesItem(element);
> > var priority:Number = Number(item.yValue);
> >
> > if (priority >= 30) {
> > return h;
> > }
> > else if (priority > 20 && priority < 30) {
> > return m;
> > }
> > else {
> > // They have not met their goal.
> > l.color = 0xFF;
> > }
> > return l;
> >
> > }
> >
>