Hi Eli -- 

1) The number of series is dynamic but for testing purposes I'm
working with 384 series and 6 categories.
2) Forgive my ignorance, but I'm not sure what the difference between
speed and performance is.  Originally I was adding an invisible label
to each series and then only showing them if the series is big enough
to display the label.  It doubled the time between initialization and
updateComplete so I'm trying to come up with a more efficient method.
3) I'll try calling validateNow() and see how it affects performance.

thanks,
Mark 

--- In flexcoders@yahoogroups.com, "Ely Greenfield" <[EMAIL PROTECTED]> wrote:
>
>  
>  
>  
> Hi Mark.
>  
> 1) How many series are we talking about here?
> 2) Are you worried about speed, performance, or both? You could add a
> label to each series ,but hide it if it isn't needed.
> 3) try calling label.validateNow() on the label to get it measured.  You
> may waste a little performance, but I would cross that bridge when you
> come to it.
>  
> Ely.
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Mark
> Sent: Thursday, September 14, 2006 12:41 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: How can I add a child element to an AreaSeries
> based on the render data?
> 
> 
> 
> Thanks Ely. I'll make sure I cache it.
> 
> I'm trying to improve performance and I seem to be stuck. In this
> case I need to measure the available height of each series, compare it
> to the height of the label, and then position the label underneath the
> datapoint with the most height during the updateDisplayList method. 
> Unfortunately, I'm finding that if I want to measure the height of the
> label I have to add it in the createChildren method rather than the
> updateDisplayList method because newly added labels (meaning added
> during the same call to updateDisplayList) return 0 for both
> getExplicitOrMeasuredHeight and getExplicitOrMeasuredWidth. Is that
> to be expected? I think it is, which for me is unfortunate because it
> means that I need to add the label to every single series and then
> remove those that don't fit (which is the case for 95% of the series).
> 
> thanks,
> mark
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "Ely Greenfield" <egreenfi@> wrote:
> >
> > 
> > 
> > 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: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of Mark
> > Sent: Thursday, September 14, 2006 9:43 AM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> > 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 flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > , "Ely Greenfield" <egreenfi@> 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: flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > [mailto:flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > ] On
> > > Behalf Of Mark
> > > Sent: Thursday, September 14, 2006 8:46 AM
> > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to