Ely, Thanks for the info.
The reason I was going with subclasses, is because the Stacked type series stacking information (stackTotals) is protected, so I needed a subclass. This whole thing started with the Stacked type series, the simple series could possibly be handled in a single case statement. However, since I have to use a subclass/override dataTipFunction for that, I am kinda stuck going the subclass route right? Is there some way to do the chart dataTipFunction and also in some cases use the series supplied function? In general, It seems like I find a lot of cases where it seems completely unnecessary to make a function or variable protected or private. I mean in the case of formatDataTip, that function does not modify anything, simply formats a string. That could have been public even. no danger of calling, and useful for calling or overriding. If it were public, it would be easy to use the case statement, supply the default formatDataTip function in the default case, and override just the ones I wanted to. And if I could have gotten to the stack totals that would have been just as good or even better. thanks, PW --- In [email protected], "Ely Greenfield" <[EMAIL PROTECTED]> wrote: > > > > In general, they're prive because we provide an alternate method for > changing the datatip that doesn't require subclassing (setting the > dataTipFunction on the chart). > > Depending on the scenario, it feels a little bit like overkill. If I > were writing this myself, I would write my own dataTipFunction for the > chart, which just cased on the type of the series generating the > datatip, and took appropriate action. The only reason I would bother > with subclassing the series is if I were trying to wrap up new or > modified series types for use in other apps or by other developers. > > If you really want to keep the datatip functionality encapsulated in the > series...The way datatips work is that the series stuffs a reference to > its datatip function into the HitData structure before it returns it > from the findDataPoints() function. So I would subclass the series, > override findDataPoints, call the super() version, and then right before > returning the hitData structures generated by the super version, stuff > my own altenrate data tip function into the hitData structures. > > Ely. > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of parkerwhirlow > Sent: Thursday, February 22, 2007 12:59 PM > To: [email protected] > Subject: [flexcoders] Chart Series - formatDataTip inconsistent > visibility > > > > > I started making some application specific tweaks to the chart series > dataTips, and it worked beautifully for ColumnSet (override the > protected function formatDataTip), but then I soon realized that only > the SET series (subclasses of StackedSeries) have that function as > protected. It's actually private on all the standard series. > > Is there a reason that it's private on the normal series, but > protected on the series sets? > > I am thinking as a workaround, I'll have to do something like this. > what do you think? > > Use the chart's dataTipFunction, and call back into the series (via > hitData.element) to a slightly differently named function > (myFormatDataTip) defined on the series subclass. I don't like this > because then I have to make sure the myFormatDataTip function exists > before calling it, and I make assumption about the signature, but I > think that would work... > > comments? > thanks, > PW >

