Sign in to follow this  
adeveloper

Pyramids.swf and Funnel.swf never fire "drawcomplete" event if there is nothing to render

Recommended Posts

Hi FusionCharts people,

 

We are using Fusion Charts 3.31XT. We have a plug-in that deals with exporting Fusion Chart SWF rendered images to image files. Our code hinges on reading the "drawcomplete" event fired by the SWF files. It takes the following form:

 

AxShockwaveFlash obj = SomeFactoryFunction();

obj.FlashCall += MyCallBack;

obj.LoadMovie(0, urlWithParams);

obj.Stop();

 

public void MyCallBack(object sender, _IShockwaveFlashEvents_FlashCallEvent e)

{

    AxShockwaveFlash obj = sender as AxShockwaveFlash;

    bool receivedDrawComplete = parseDrawComplete(e.request);

    if (receivedDrawComplete)

    {

         /// Do my stuff and finish!

    }

}

 

Now, let's say we have a dataset that will result in no rendering in the Funnel and/or Pyramid chart:

file:///MyFolder/Funnel.swf?dataXML=<chart animation='0' caption="MyChart" xAxisName="" yAxisName="" labelDisplay="wrap" showValues="1" numberPrefix="%24" decimals="2" decimalSeparator="." thousandSeparator="," formatNumberScale="1" isPercentage="0" showNames="1" isSliced="1" slicingDistance="5" streamlinedData="0" labelPadding="15" showBorder="0" bgColor="#FFFFFF" bgAlpha="0" xmlns="http://MyNameSpace"><styles><definition><style name="titleFont" type="font" font="Tahoma" size="9.75" color="000000" bold="1" italic="0" underline="0" /></definition><application><apply toObject="Caption" styles="titleFont" /></application></styles><set name="A" value="0.00" /><set name="B" value="0.00" /></chart>&0&registerWithJS=1

 

Then "drawcomplete" or even the "rendered" events actually never get fired. The last chronological event we'd receive would be "dataloaded". But if we do actually enter some non-zero values into the dataset, then we'd get "rendered" and "drawcomplete" firing after "dataloaded".

 

This, of course ,is causing some issues for us because we need to know when the rendered image is finalized. And with this condition, we have no idea of how long to wait and thus run into the danger of blocking indefinitely.

 

It'd be nice if workaround can be provided for this (preferably not installing a later version, as we would rather not to deal with backward compatibility issues on our end).

 

Note: I will gladly provide our license number through PM if that's necessary for the question to be answered quickly.

 

Thanks.

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Welcome to FusionCharts Forum.

 

Could you please try rendering the charts exclusively in JavaScript mode by adding just one line of code before creating the chart object instance?

Ref. JavaScript Code:
FusionCharts.setCurrentRenderer('javascript');

For more information on "Creating JavaScript (HTML5) charts", please visit the link: http://docs.fusioncharts.com/widgets/Contents/?FirstChart/UsingPureJS.html

 

Please note that the latest version of FusionCharts XT has a lots of improvements and features in JavaScript variant of charts. so, we will suggest you to render JavaScript charts if feasible.

Hope this helps!

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