mssjdb

How To Do Fusion Charts Batch Export On Server Side?

Recommended Posts

I am trying to save my fusion chats as png on server side. i am using php/mysql. i want to export nearly 10 images of fusion charts at a time. i was unable to save at least one graph on server. how i can do this?

 

i tried with enter link description here can you give me an example?

 

while trying to save graphs on client side. i was succeeded up to save one graph. but i am unable to save more than one graph. i am not getting according to server side at least one graph.

 

 

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

FusionCharts does not support exporting multiple charts on server-side natively.

 

However, you can export multiple charts to their individual image files with one button click.

Call a JavaScript function on the click of the button, which would initiate export of multiple charts.

 

Ref. Code:

 

<script type="text/javascript">

function ExportMyCharts() {

var chartObject1 = getChartFromId('myChart1');

if( chartObject1.hasRendered() ) chartObject1.exportChart();

// export another chart

var chartObject2 = getChartFromId('myChart2');

if( chartObject2.hasRendered() ) chartObject2.exportChart();

}

</script>

 

Also, for server-side export, you would need to set proper path according to your server-configuration.

 

 

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'>

 

Hope this helps.

Share this post


Link to post
Share on other sites

am using fusion charts. and am exporting graphs to server side as pngs. here i have more than 20 graphs. now have to run another file if exporting was completed. it is taking nearly 4 min to complete export.


Now my doubt is, how i can know wither download completed or not using jquery or any other.

Share this post


Link to post
Share on other sites

am using fusion charts. and am exporting graphs to server side as pngs. here i have more than 20 graphs. now have to run another file if exporting was completed. it is taking nearly 4 min to complete export.


for this am using this technique How do I configure FusionCharts export component to invoke a callback JavaScript method, when the chart has been saved by user?


but am getting alert with error like FusionChartsExport: object::FusionCharts was not found. Verify script inclusions.


How i can overcome from this.

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