mvirtue

Can't Get Export To Server ("save" Option) Working

Recommended Posts

I have created a fusionchart using the Flash version of FusionChartsXT here:

 

http://dev.virtualcreations.com.au/pvsell/dbpage.php?view=YnlwYXNzX19sb2dpbnM9ZG9pdCZwZz1ncmFwaCZpZD0zJmdyYXBoPUVsZWNQcm9q

 

It uses this XML data:

 

http://dev.virtualcreations.com.au/pvsell/dbaction.php?action=Graph&dbase=projects&id=3&graph=ElecProj

 

As you can see from the XML, I've elected to export an image of the graph to the sever via the "save" option.

 

The export handler path is correct:

 

http://dev.virtualcreations.com.au/brostools/jquery/fusionchartsxt/export/FCExporter.php

 

However, the handler never gets called. I know that, because I've put a small piece of code into the handler to write a small text file (called "my.txt") to the output directory (http://dev.virtualcreations.com.au/pvsell/temp), and that file never gets created (not unless I access the handler script directly).

 

Any ideas what I'm missing? Specifically:

 

I'm not quite sure how the export gets triggered.

And I'm not quite sure how to specify which image type to export (JPEG, PDF, etc).

 

Any pointers you can offer would be greatly appreciated.

 

Thanks in advance,

 

Mark.

 

 

 

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi Mark,

 

A warm welcome to FusionCharts Forum! smile.gif

 

From the chart XML, the XML configuration for exporting charts at server-side is not proper.

 

You would need to set the proper path of FCExporter file in the exportHandler attribute.(according to the location of files) under the chart element.

 

Also, you would need to set the path in FCExporter file. for ex: if you are using FCExporter.php, you would need to set path in the define("SAVE PATH,"./") function as well as in define ( "HTTP_URI", "path of the folder in which FCExporter file exists" );

 

You would need to use following attribute configuration for exporting charts at server-side.

 

exportEnabled='1'

exportHandler='FCExporter file path'

exportAtClient='0'

exportAction='save/download'

 

Ref. Code:

<chart ... exportEnabled='1' exportHandler='FCExporter file path' exportAtClient='0' exportAction='save'>

 

For more information, please refer the following link:

http://docs.fusionch...erOverview.html

 

Also, find attached illustration for your reference.

 

Hope this helps.

Export_PHP.zip

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