Hi,

 

I am working on an application with a Line Chart that contains various line series. I have made some checkboxes which should hide/show the different line series. Here is the mxml/actionscript for the various elements:

 

Checkbox:

 

<mx:CheckBox id="euribor3" label="Euribor 3 mese lettera" click="changeEuribor();" />

 

Chart:

 

<mx:LineChart id="financeChart" dataProvider="{chartData}">

                <mx:series>

                        <mx:LineSeries id="lineEuribor3" displayName="Euribor 3 mese lettera" yField="Euribor3" showDataEffect="fadeIn" hideDataEffect="fadeOut">

                                    <mx:stroke>

                                                <mx:Stroke color="0xFF0000" weight="3" alpha="0.8"/>

                                    </mx:stroke>

                        </mx:LineSeries>

            </mx:series>

</mx:LineChart>

<mx:Legend dataProvider="{financeChart}"/>

 

Checkbox click function:

 

private function changeEuribor2():void

 {

lblTest.text = "event fired";

            if (euribor3.selected == true) {

                        if (lineEuribor3.alpha <= 0.1) {

                                    lineEuribor3.showDataEffect();

                        }

            } else if (euribor3.selected == false) {

                        lineEuribor3.hideDataEffect() ;

                        lblTest.text = "Hide Line";

            }

}

 

Problem:

 

When I click on the checkbox I get the following error message:

 

TypeError: Error #1006: Call attempted on an object that is not a function.

            at EnaCharts/::changeEuribor()

            at EnaCharts/__euribor3_click()

 

What am I doing Wrong????

 

Thanks.

 

Torben Nielsen



--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to