Sign in to follow this  
allencoded

Export Image To Sever Problem But Fine When Downloaded?

Recommended Posts

We are using FusionCharts Trial and are trying to test out all the features before purchasing a full license. We have everything setup perfectly but we are encountering one last road block.

 

What Works:

Exporting as Download works great

Our charts work beautifully

 

 

Problem:

When we try to save an image of the chart and set it as download our $_Post passes data and we are able to export the image just fine.

But when exportAction is set to 'save' our $_Post no longer works, it passes nothing? Therefore resulting in insufficient data.

 

We are operating in an xajax environment, and using Fusion Charts php setup.

 

Here is an example of our Chart attributes:

$FC->setChartParams("bgColor=f3f3f3; showPercentValues=1; showLabels=0; enableRotation=1; pieRadius = 80; enableSmartLabels = 1; pieYScale=50; exportEnabled=1; exportAtClient=0; exportAction=save; exportHandler=../lib/inc/fusionCharts/exportHandlers/FCExporter.php;");

 

I am also attaching our FCExporter.php.

 

We are a bit confused why it works perfect for downloading and doesn't post at all for saving? Any help would be greatly appreciated.

FCExporter.php

Edited by allencoded

Share this post


Link to post
Share on other sites
Guest Sumedh

We are using FusionCharts Trial and are trying to test out all the features before purchasing a full license. We have everything setup perfectly but we are encountering one last road block.

 

What Works:

Exporting as Download works great

Our charts work beautifully

 

 

Problem:

When we try to save an image of the chart and set it as download our $_Post passes data and we are able to export the image just fine.

But when exportAction is set to 'save' our $_Post no longer works, it passes nothing? Therefore resulting in insufficient data.

 

We are operating in an xajax environment, and using Fusion Charts php setup.

 

Here is an example of our Chart attributes:

$FC->setChartParams("bgColor=f3f3f3; showPercentValues=1; showLabels=0; enableRotation=1; pieRadius = 80; enableSmartLabels = 1; pieYScale=50; exportEnabled=1; exportAtClient=0; exportAction=save; exportHandler=../lib/inc/fusionCharts/exportHandlers/FCExporter.php;");

 

I am also attaching our FCExporter.php.

 

We are a bit confused why it works perfect for downloading and doesn't post at all for saving? Any help would be greatly appreciated.

 

Hi,

 

I am not able to replicate the same.

 

Server-side export functionality with 'save' action is working fine at our end.

 

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" );

 

Please try to set following attributes for exporting at server-side, under the chart element.

exportEnabled='1'

exportHandler='FCExporter file path'

exportAtClient='0'

exportAction='save/download' (you can use use save or download option here)

 

Ref. Code:

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

 

Also, find attached illustration for your reference.

 

Hope this helps.

Export_PHP.zip

Share this post


Link to post
Share on other sites

Hi,

 

I am not able to replicate the same.

 

Server-side export functionality with 'save' action is working fine at our end.

 

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" );

 

Please try to set following attributes for exporting at server-side, under the chart element.

exportEnabled='1'

exportHandler='FCExporter file path'

exportAtClient='0'

exportAction='save/download' (you can use use save or download option here)

 

Ref. Code:

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

 

Also, find attached illustration for your reference.

 

Hope this helps.

 

 

Thanks its working now!

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