Hi!

 

Unfortunately it will invalidate the display list. I just got into same troubles few days ago. A workaround was to create labels and do addChild in the set data method, which in my case was fortunately possible to do.

 

BR, Pekka

 


From: [email protected] [mailto:[email protected]] On Behalf Of Ely Greenfield
Sent: 14. syyskuuta 2006 21:01
To: [email protected]
Subject: RE: [flexcoders] Re: How can I add a child element to an AreaSeries based on the render data?

 

 

 

Hi Mark.  I would make your child creation code cache regardless of circularity reasons, for performance concerns.  I don't believe adding a child automatically invalidates your display list. I'm pretty sure it _does_ invalidate measurement, which then _potentially_ invalidates display. But the built in series classes won't invalidate their display due to a measurement.

 

Ely.

 

 

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Mark
Sent: Thursday, September 14, 2006 9:43 AM
To: [email protected]
Subject: [flexcoders] Re: How can I add a child element to an AreaSeries based on the render data?

Thanks for your response Ely. Is there any concern with a circular
reference? What I mean is if I call addChild in updateDisplayList
that will call invalidateDisplayList, which will ultimately call
updateDisplayList again, right? If I make my child creation code
conditional (so that it only runs the first time I go through
updateDisplayList) will that be enough to avoid the loop?

thanks,
Mark Haugen

--- In [EMAIL PROTECTED]ups.com, "Ely Greenfield" <[EMAIL PROTECTED].> wrote:
>
>
>
>
> Hi Mark. createChildren() is the right place for a compnent to create
> 'static' children. But dynamic children...i.e. children that are created
> or destroyed based on some runtime information, like amount of data,
> size on screen, etc...need to be created elsewhere.
>
> In general, I would reccomend custom components create/destroy dynamic
> children in their commitProperties() function. This is because
> adding/removing children usually means the component needs to be
> re-measured. Doing it in commitProperties means you do it before any
> pending measurement happens, and don't end up with unnecessary extra
> measurement passes.
>
> Charts, however, don't have a natural measured size. So the various
> series types create and destroy their children as necessary in their
> updateDisplayList() function. At that point, you can be sure your data
> is all up to date.
>
> Ely.
>
>
> ________________________________
>
> From: [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] On
> Behalf Of Mark
> Sent: Thursday, September 14, 2006 8:46 AM
> To: [EMAIL PROTECTED]ups.com
> Subject: [flexcoders] How can I add a child element to an AreaSeries
> based on the render data?
>
>
>
> I'm creating an AreaChart that has labels inside each area. Very few
> of the series will be large enough to display a label so for
> performance reasons I only want to add labels to those that are big
> enough. It seems to me that the best place to create and add the
> label is in createChildren(), however in examining the renderData, the
> filterCache is null and all the bounds values in the cache are NaN.
> Where would be the best place to add the label (as far as performance
> goes)?
>
> Thanks in advance for any help.
>
> Mark Haugen
>

__._,_.___

--
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

__,_._,___

Reply via email to