PDA

View Full Version : [CLOSED] AnimateConfig, DirectMethod for Chart listeners not seem to be working



CarpFisher
May 11, 2012, 2:42 PM
I'm using the NuGet 2.0 beta version and it seems that the AnimateConfig DirectMethods for Chart are not firing. Is that only me?

Daniil
May 11, 2012, 3:37 PM
Hi,


Ithe AnimateConfig DirectMethods for Chart are not firing.

I'm afraid I don't understand what you are talking about. Please clarify.

CarpFisher
May 11, 2012, 11:19 PM
E.g.



<ext:Chart
ID="Chart1"
runat="server"
Theme="Fancy"
Shadow="true">
<AnimateConfig Easing="BounceOut" Duration="750" >
<Listener>
<afteranimate Handler="NOT_FIRING"/>
<beforeanimate Handler="NOT_FIRING"/>
</Listener>
</AnimateConfig>

...

</ext:Chart>

The events in the listener of the AnimateConfig is not firing....I've tried Chrome and IE8

Vladimir
May 12, 2012, 2:26 PM
Thanks for the report. Fixed in SVN

CarpFisher
May 17, 2012, 2:21 PM
I'm using afteranimate event , like the following code segment:


<ext:Chart ID="chtFPABar" runat="server" Shadow="true" StyleSpec="background:#fff" Animate="true"
Flex="1" Theme="Fancy" >

<AnimateConfig Easing="BounceOut" Duration="750">
<Listeners>

<afteranimate Handler="#{DirectMethods}.SaveCharts('FPABar',Ext.draw.engi ne.SvgExporter.self.generate(null, #{chtFPABar}.surface));"/>
</Listeners>
</AnimateConfig>

...

But that afteranimate fired a lot of events. I'm suspecting that because the chart contains a lot of little or sub animations, all the sub-animations each fire it's own event. Is it possible to just get one afteranimate event? I need this event to generate an SVG and submitted to the server side. I have otherwise no way to get the graphic in the server. Do you perhaps have an alternate suggestion?

Daniil
May 17, 2012, 3:51 PM
Is it possible to just get one afteranimate event?

I don't think it's possible.


I need this event to generate an SVG and submitted to the server side.

Do you really need exactly the AfterAnimate event?


Do you perhaps have an alternate suggestion?

Please provide more details about the requirement. Which moments do you need to save the Chart?

CarpFisher
May 17, 2012, 4:06 PM
I need to know what is the chart looks like on the client side. I need to know that as soon as the chart is rendered on the client screen. I think the best time is to do that after all the animation is finished. Surely ExtJS should know when all the sub-animations are completed. It should just fire one event instead of multiple little ones. I think this is an ExtJS issue rather than Ext.Net.

I'm current using the AfterRender event, and use setTimeout to wait for 2 seconds, I'm presuming that is time all animation is finished. However this has a problem as IE sometimes rendered very slowly and I have situation that I only have partially drawn SVG as the animation is still busy when it send the SVG to the server. So, still the best way seems to be the afteranimate event. Do you have a better suggestion? Is it worth to dig into the ExtJS source and find out what is happening there?

Vladimir
May 17, 2012, 4:31 PM
I am affraid that if you need automatically to save svg after any change then it is better to deactivate animation and use 'refresh' event of chart

Animation uses for many chart elements and each chart element will fire event after animation (also can be many animation cycles, animation is complex for chart)