Exporting charts as PDF/Images >JavaScript Reference > Debugging your JavaScript

With so much of things to do in life, scripting can at times get a tad tough on us! But with FusionCharts, we are trying to make it slightly easier for you to know that small error which is causing your FusionCharts Export Component to not work as it should.

Enabling the "debugMode"

It is not a good idea that everyone gets to see that error on your page. So, we have hidden them all. But, you can enable the debugMode of the FusionChartsExportObject and get to see all the errors that were trapped by FusionChartsExportObject.

To enable debubMode on any individual instance of the FusionChartsExportObject, use the following code.

var myComponent = new FusionChartsExportObject('myComponent', 'FusionCharts/FCExporter.swf');
myComponent.debugMode = true;

You can also enable debugMode in the constructor function of FusionChartsExportObject by setting debugMode as true.

You can also enable debugMode globally for all FusionChartsExportObject in a page by using the code below:

FusionChartsExportObject.defaultParameters.debugMode = true;

After you've enabled debugMode, FusionChartsExportObject will halt at every error and let you know of it as a JavaScript alert message.

 

Debugging your Export Components from the Error codes

When FusionChartsExportObject encounters an error, it raises an error code that can help you pin-point what is causing the error. The following table lists all the error codes and the possible ways to debug them.

Error Code Debug Information
10901271400

The FusionChartsExportObject did not find the infosoftglobal.FusionCharts object defined. FusionChartsExportObject is dependant upon the infosoftglobal.FusionCharts object for a large number of its core functionalities.

 

Solution:

Check whether FusionCharts.js is included in the page. Also make sure that FusionCharts.js is included before including FusionChartsExportComponent.js

10902091233

The value of the containerNode parameter of the Render() function refers to an HTML Element Node that does not exist or does not support appending of HTML data.

 

Solution:

Verify whether the HTML container element (usually a <span> or <div>) is actually defined before the Render() function is called. When a DOM ID string is passed to the containerNode parameter of the Render() function, it should be exactly the DOM ID of the HTML container element.

10902101448

The FusionChartsExportComponent failed to render due to an exception raised by the internally while the Render() function was invoked.

 

Solution:

Verify the parameters of the erring FusionChartsExportObject. Try by removing all optional parameters and then slowly adding the parameters one by one until the error occurs again.

 

Note: You can also take a cue from the Error Message to get some idea what is causing the error.

10902182119

The Flash Player of the browser is not compatible with the FusionChartsExportObject. It generally happens when the general version detection methodology of Flash Player fails.

 

Solution:

Upgrade your Flash Player to Adobe's latest version. FCExporter.swf requires version 10 or higher in order to function.

 

In case upgrading fails to solve your issue, try to run this code in another browser or another computer and check whether the code runs. If it runs fine, try to check what are the differences between the two cases that is causing your codes to not run in the former case.

 

Note: You can also take a cue from the Error Message to get some idea what is causing the error.

10902041759 The incoming data stream from the charts after the capture phase is incomplete or corrupt. FusionChartsExportObject could not extract a valid "id" from the steam.
10902041939 FCExporter.swf did not convey a valid "id" to the FusionChartsExportObject.
10902041917

FusionChartsExportObject could not load the FCExporter.swf EMBED element from the "id" conveyed by by the FCExporter.sef itself.

 

Solution:

A possible cause for this is when there is more than one DOM element defined by the same "id" that was used to instantiate the FusionChartsExportObject. Check whether the "id" used to define the FusionChartsExportObject has not been repeated anywhere else as DOM Id of any other element.

10902061902

The FusionChartsExportObject did not have the minimum number of parameters that are required in order to initialize it.

 

Solution:

Refer to JavaScript API to check whether you are following the correct constructor syntax to initialize your new FusionChartsExportObject.

10902091732

The FusionChartsExportObject did not have the minimum number of parameters that are required in order to initialize it.

 

Solution:

Refer to JavaScript API to check whether you are following the correct constructor syntax to initialize your new FusionChartsExportObject.

 

It is likely that you are not providing the swfLocation parameter of the FusionChartsExportObject.

10902091820

There is a type mismatch of the id and/or swfLocation parameter.

 

Solution:

Refer to JavaScript API to check whether you are following the correct constructor syntax to initialize your new FusionChartsExportObject.

10902182131

Invalid Adobe Flash player version.

 

Solution:

Upgrade your Flash Player to Adobe's latest version. FCExporter.swf requires version 10 or higher in order to function.

10902220400

There was an internal error while accessing its internal objects.

 

Solution:

Verify the parameters of the erring FusionChartsExportObject. Try by removing all optional parameters and then slowly adding the parameters one by one until the error occurs again.

10902091318

The FusionChartsExportComponent could not update itself internally. In general, this is caused when one or more of the parameters are of incorrect type.

 

Solution:

Verify the parameters of the erring FusionChartsExportObject. Try by removing all optional parameters and then slowly adding the parameters one by one until the error occurs again.

 

Note: You can also take a cue from the Error Message to get some idea what is causing the error.

10902091853

The sourceCharts to initiate exporting was not a valid Array.

 

Solution:

Refer to JavaScript API to check whether you are following the correct syntax to define your sourceCharts.

10902092026

The chart reference provided as sourceCharts did not return a valid object.

 

Solution:

Check whether the Chart IDs provided in sourceCharts are correct. If they are correct, make sure that the charts are already rendered.

10902092036

There was some error while internally calling exportChart() function on the sourceCharts provided.

 

Solution:

Make sure you are using correct FusionCharts SWF files. Export component requires FusionCharts version 3.1 or higher.