I'm trying to create an AreaChart where the number (and definition) of
series will change as the user chooses to filter the data.  As the
filter changes I want it to clear all series and slide the new ones in
from the bottom.  To do this I'm replacing all the series in the chart
each time the user chooses to filter:

private function setChartSeries():void 
{
    aChart.series = new Array();
    var series:Array = getFilteredSeries();
                
    for (var i:int = 0; i < series.length; i++) {
        var s:AreaSeries = new AreaSeries();
        s.yField = series[i].field;
        s.setStyle("showDataEffect", slideIn);
        aChart.series.push(series);
    }
}

<mx:SeriesSlide id="slideIn" duration="600" direction="up"/>

It works great until I add the showDataEffect transition, at which
point it gives me the following error after filtering:

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
        at
mx.charts.chartClasses::Series/mx.charts.chartClasses:Series::stripNaNs()
        at
mx.charts.series::AreaSeries/mx.charts.series:AreaSeries::updateFilter()
        at
mx.charts.chartClasses::Series/mx.charts.chartClasses:Series::validateTransform()
        at mx.charts.chartClasses::Series/getRenderDataForTransition()
        at mx.charts.effects.effectClasses::SeriesSlideInstance/play()
        at mx.effects::EffectInstance/startEffect()
        at mx.effects.effectClasses::ParallelInstance/play()
        at mx.charts.chartClasses::ChartBase/::advanceEffectState()
        at
mx.charts.chartClasses::ChartBase/mx.charts.chartClasses:ChartBase::updateDisplayList()
        at
mx.charts.chartClasses::CartesianChart/mx.charts.chartClasses:CartesianChart::updateDisplayList()
        at mx.core::UIComponent/validateDisplayList()
        at mx.managers::LayoutManager/::validateDisplayList()
        at mx.managers::LayoutManager/::doPhasedInstantiation()
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at mx.core::UIComponent/::callLaterDispatcher2()
        at mx.core::UIComponent/::callLaterDispatcher()

I did a search of the archives and I found something that looks
similar:  http://groups.yahoo.com/group/flexcoders/message/42737. 
Could this be the same thing?  If so, what is the known fix that is
referenced here:
http://groups.yahoo.com/group/flexcoders/message/42821?  If it's not
the same thing, does anybody have any ideas?

Thanks in advance for any help.

mark






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

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