Extend the LineSeries class.  Override the findDataPoitns function. 
In its body, paste a copy of that from the original LineSeries class.
 Change the if (!isNaN(v.yFilter) && !isNaN(v.xFilter)) to if
(!isNaN(v.yNumber) && !isNaN(v.xNumber)).  Replace all _renderData
references with just renderData.  I thought that last bit was obvious
because I assumed you'd actually looked at the source code properly.

Graham

--- In [email protected], "thegiffman" <[EMAIL PROTECTED]> wrote:
>
> Have you figured out a way to do this by extending the LineSeries
> class, rather than replacing it?  I can copy the code in LineSeries to
> my own file, and have the compiler use that, rather than the internal
> one.  Then I can do the fix.  However, I cannot actually do it by
> extending LineSeries, because findDataPoints references private
> variables and functions (like nearly all the mx functions we'd like to
> extend  :-(  ).
> 
> --- In [email protected], "g_odds" <g_odds@> wrote:
> >
> > I noticed this bug several weeks ago and fortunately I managed to find
> > the problem and create a workaround.
> > 
> > You'll have to have a poke around in the LineSeries source code to
> > fully understand what I'm saying here. You need to extend the
> > LineSeries class and extend the findDataPoints function. In the
> > LineSeries' findDataPoints function the if (!isNaN(v.yFilter) &&
> > !isNaN(v.xFilter)) condition will fail because when filterData = false
> > and the filterCache function of the series is called (this happens
> > when the min or max of an axis is set because the mapping changes) the
> > .yFilter and xFilter properties will be set to NaN for the points.
> > That makes sense in it's own way, but the upshot of that is that the
> > minItem variable is never set and, therefore, an empty array will
> > always be returned.
> > 
> > So the fix is to copy the code from the LineSeries source code and in
> > your overriding function change the if (!isNaN(v.yFilter) &&
> > !isNaN(v.xFilter)) condition to if (!isNaN(v.yNumber) &&
> > !isNaN(v.xNumber)).  So yes, this is a nasty little hack but I haven't
> > found any other way to solve the problem.
> > 
> > Hope that helps,
> > 
> > Graham
> > 
> > 
> > --- In [email protected], "thegiffman" <thegiffman@> wrote:
> > >
> > > If I take the standard line chart demo code, and add showDataTips to
> > > the line chart, they display normally.  Yet, the moment I set
> > > filterData to false on one of the LineSeries, it kills data tips for
> > > this series.  I think this is a bug in the charting components,
as the
> > > data tips and the filterData attribute do not conflict for column
> > > charts.
> > > 
> > > 
> > > 
> > > 
> > > <?xml version="1.0"?>
> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
> > >      <mx:Script><![CDATA[
> > >      import mx.collections.ArrayCollection;
> > >      [Bindable]
> > >      public var expenses:ArrayCollection = new ArrayCollection([
> > >          {Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450},
> > >          {Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600},
> > >          {Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300}
> > >      ]);
> > >      ]]></mx:Script>
> > >      <mx:LineChart id="myChart" dataProvider="{expenses}"
> > > showDataTips="true">
> > >          <mx:seriesFilters>
> > >              <mx:Array/>
> > >          </mx:seriesFilters>
> > >          <mx:horizontalAxis>
> > >              <mx:CategoryAxis dataProvider="{expenses}"
> > > categoryField="Month"/>
> > >          </mx:horizontalAxis>
> > >          <mx:series>
> > >              <mx:LineSeries yField="Profit" displayName="Profit"
> > > filterData="false"/>
> > >              <mx:LineSeries yField="Expenses"
displayName="Expenses"/>
> > >              <mx:LineSeries yField="Amount" displayName="Amount"/>
> > >          </mx:series>
> > >      </mx:LineChart>
> > > </mx:Application>
> > >
> >
>


Reply via email to