Sign in to follow this  
SteveC

Fusionchartsexportcomponent Render Resulting In Object Required Error

Recommended Posts

Hi All,

 

I'm encountering an error with the FusionChartsExportComponent.js script when my ASP code is attempting to call myExportComponent.Render. The error mesage I'm getting is:

 

Line 9

Error: object required

 

I only seem to get this error when my chart is configured to render with the FC.setCurrentRenderer('javascript') and not when I render it using Flash.

 

When I choose to step into the debugger in Visual Studio 2005, the debugger breaks on the bolded text below in the FusionChartsExportComponent.js:

 

getNew:function(a){var b=document.createElement(a),arg;for(var i=1;c<arguments.length;i++){arg=arguments.split('=');b.setAttribute(arg[0],arg[1])}return b},sync:function(a,B){for(var c in a){b[c]=a[c]}}

 

 

and examining the value of 'b' from the document.createElement(a) it shows as 'undefined'. the value for 'a' is the list of component attribute values that were set just prior to making the .Render call.

 

Here is how I have my .asp code is setup for the component:

 

My chart definition is as follows:

<chart exportEnabled='1' exportAction='save' exportAtClient='0' exportHandler='FusionCharts/ASP_Net/FCExporter.aspx' .../>

 

and further into the .asp file:

 

<div id="fcexpDiv" align="center" style="display:none;">FusionCharts Export Handler Component</div>

 

In a Script block I have the following:

 

var myExportComponent = new FusionChartsExportObject("fcExporter1", "FusionCharts/FCExporter.swf");

 

myExportComponent.sourceCharts = ['Chart23', 'Chart24'];

myExportComponent.exportAttributes.exportFormat = 'PNG';

myExportComponent.debugMode = true;

myExportComponent.componentAttributes.fullMode='1';

myExportComponent.componentAttributes.saveMode='both';

myExportComponent.componentAttributes.showAllowedTypes = '1';

myExportComponent.componentAttributes.width = '350';

myExportComponent.componentAttributes.height = '140';

myExportComponent.componentAttributes.showMessage = '1';

myExportComponent.componentAttributes.message = 'Click on button above to begin export of charts. Then save from here.';

myExportComponent.Render("fcexpDiv");

I'm guessing I missed a step in setting the chart up for export when rendering it in Javascript instead of Flash.

 

If someone can point me in the right direction, I would appreciate the assistance.

 

Thanks,

Steve

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