Hi Ely,
In the meantime I found another solution. Here is the code:
private function changeEuribor():void
{
lblTest.text = euribor3.selected.toString();
if (euribor3.selected == true) {
if (lineEuribor3.alpha == 0.0) {
fadeIn.target = lineEuribor3;
fadeIn.play();
lblTest.text = "Show Line";
}
} else if (euribor3.selected != true) {
if (lineEuribor3.alpha == 1.0) {
fadeOut.target = lineEuribor3
fadeOut.play();
lblTest.text = "Hide Line";
}
}
}
This works perfect.
Best regards.
Torben Nielsen
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Ely Greenfield
Sent: giovedì 23 marzo 2006 23.31
To: [email protected]
Subject: RE: [flexcoders] Re: Flex 2: Chart problem
Sorry, I forgot my usual question ... Is this Flex 1.5, or 2.0?
If it's 2.0, there are showEffect and hideEffect styles on LineSeries.
Ely.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Torben Nielsen
Sent: Thursday, March 23, 2006 1:35 PM
To: [email protected]
Subject: RE: [flexcoders] Re: Flex 2: Chart problem
Hi Ely,
Thanks for your reply. I already tried to toggle the visibility, but this
does not trigger the effect. Even though it works, it's not very elegant.
There are not a method in the LineSeries class called showEffect or
hideEffect.
Could I maybe do somthing using the dispatchEvent method?
Best regards.
Torben Nielsen
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Ely Greenfield
Sent: giovedì 23 marzo 2006 22.31
To: [email protected]
Subject: RE: [flexcoders] Re: Flex 2: Chart problem
Set the showEffect/hideEffect instead of showDataEffect/hideEffect, and set
the visibility of the series to true/false. When you toggle the visibility,
the show/hide effects will be played automatically.
Ely.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Torben Nielsen
Sent: Thursday, March 23, 2006 1:15 PM
To: [email protected]
Subject: RE: [flexcoders] Re: Flex 2: Chart problem
Hi,
that did not work. Maybe it's better if I explain what I am trying to
obtain. I have created to effects in my mxml:
<mx:Fade id="fadeIn" alphaTo="1.0" duration="500"/>
<mx:Fade id="fadeOut" alphaTo="0.1" duration="500"/>
These I would lake to use every time on of the lineseries is selected or
unselected to make an more elegant change when a line series is made
visibile or invisibile.
Any ideas?
Thanks.
Torben
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Doug Lowder
Sent: giovedì 23 marzo 2006 21.39
To: [email protected]
Subject: [flexcoders] Re: Flex 2: Chart problem
I believe showDataEffect and hideDataEffect are Effect objects, not
functions. Try lineEuribor3.showDataEffect.play() and
lineEuribor3.hideDataEffect.play().
--- In [email protected], "Torben Nielsen" <[EMAIL PROTECTED]>
wrote:
>
>
>
> 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
Yahoo! Groups Links
--
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
--
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
--
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
--
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
--
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/