Sign in to follow this  
Lonnie W

FC_Rendered equivalent after calling setDataURL?

Recommended Posts

FusionCharts calls the FC_Rendered function after initially rendering a chart on the page, however is there an equivalent to the FC_Rendered function that gets called after a subsequent setDataURL call? I want to trigger a chart update (after the initial load) from a UI element and I want another part of my page to be updated once the chart has been updated.

Share this post


Link to post
Share on other sites

I'm afraid we've intentionally blocked FC_Rendered call during subsequent setDataURL calls, as it was leading to confusions while rendering.

Share this post


Link to post
Share on other sites

Can we hope for some sort of alternate JavaScript hook, perhaps FC_Updated? When it takes a few moments for the data to generate and then get sent back into the FusionChart, I would like to give our users a bit of feedback so that they are not rapidly clicking the (custom) refresh button thinking that their requests were not performed.

Share this post


Link to post
Share on other sites

The idea is that when the chart is loaded first time, only then you need to know that the chart has loaded and rendered.

When updating the chart subsequently, you already know the event - because the event is triggered by you.

However, if you still need FC_Updated function, I can tell you where to modify the .fla to call the same.

Share this post


Link to post
Share on other sites

Yes, we do know that we are updating the chart, however the call to setDataURL does not wait for the update to complete before returning control to the calling JavaScript. I don't think it would be a good idea for setDataURL to hold on to control because this would cause everything else to be on hold, so I figured there would be another callback function just like FC_Rendered.

 

 

 

I'm not versed in Flash coding, nor even sure if I have the tools to modify (compile?) the code. In any case, perhaps your modification suggestion might help others who see this post, so please offer up your suggestion.

 

 

 

Thanks.

Share this post


Link to post
Share on other sites

In each .fla file > Chart Scene > Actions Layer > Frame 1 > Actions, you'll have to add the following code just before the line containing "stop()":

if (ExternalInterface.available && _registerWithJS && renderRegistered){
 ExternalInterface.call("FC_Update", _DOMId);
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this