Sign in to follow this  
sumit

Export Fusionchart Via Client Side

Recommended Posts

Hi

 

Actually I am trying export fusionchart at client side, I am trying to export it using Javascript method on pressing a button.

Here is the method how it goes

 

<script>

var myChart = new FusionCharts( "../../../../Charts/Column3D.swf", "myChartId", "400", "300", "0", "1" );

myChart.setXMLUrl("ExportData.xml");

myChart.render("chartContainer");

 

var myExportComponent = new FusionChartsExportObject("fcExporter1", "../../../../Charts/FCExporter.swf", { fullMode : "1" , saveMode : "both" , showAllowedTypes: "1", width : 400, height : 180 } ); myExportComponent.Render();

 

function FC_Exported(e) { alert ( e.DOMId + (e.statusCode ? " chart has been Exported." : " chart has not been Exported." ) ); }

</script>

 

 

Here when I call onClick=" myChart.exportChart( { exportFormat : 'jpg'} );"

 

 

Its working but I am unable to get the labels of chart. Please find the attached snapshot like how I am getting when I export. Please help me out in this issue as soon as possible. Here at the place of labels I am getting some other X-axis value which is not defined.

post-36451-0-77325200-1360133681_thumb.jpeg

Thanks and Regards

Sumit

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi Sumit,

 

A warm welcome to FusionCharts Forum! smile.gif

 

Apologies for the delayed response.

 

Could you please try it using latest version of FusionCharts XT?

 

Recently, we have released a latest version of FusionCharts XT i.e., FusionCharts XT v3.3.0. It has many bug fixes and enhancements.

 

You can get the latest version from here: http://www.fusioncharts.com/download/trials/

 

If this doesn't help, please feel free to revert.

Share this post


Link to post
Share on other sites

Hey Sumit,

 

Flash charts are exported along with X axis datalabels.

 

Can you please share the XML and type of chart used for further testing?

Share this post


Link to post
Share on other sites

Hi sir

 

please find the attachment of the xml file

 

and chart type is - MSCombiDY2D.swf

 

please provide the solution as soon as possible

 

Thanks and regards

sumit

 

sample.xml

Share this post


Link to post
Share on other sites

Hi,

 

Hi sir

 

please find the attachment of the xml file

 

and chart type is - MSCombiDY2D.swf

 

please provide the solution as soon as possible

 

Thanks and regards

sumit

 

 

Please note that the XML you have attached does not correspond to the previous screenshot that you had sent. Al;so, the attached XML file does not have any export related attributes, like, "exportEnabled", "exportAtClient" and "exportHandler".

 

Also, with the proper configuration the chart is exported perfectly. Please check with the screenshot.

 

post-8144-0-41752900-1361615306_thumb.jpg

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Hi sir

i have own custom button .i want to enable that property in my own button with out using export enable in the xml. can you please provide the solution of this method .i have create custom java script function that function i have already mention .

 

Thanks and regards

sumit

Edited by sumit

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi Sumit,

 

Could you please let us know, whether you are trying to set the "exportEnabled", "exportAtClient" and "exportHandler" parameters in the "exportChart()" function in a following way?

 

Ref. Code:

myChart.exportChart( { exportEnabled: 1, exportAtClient : 1, exportFormat : 'jpg'} );

 

If yes, please note that the parameter "exportEnabled" can not be set using "exportChart()" method. So you would need to specify in the chart XML only.

 

Please find the list of export-related attributes that can be overridden, by following the link below:

http://docs.fusioncharts.com/charts/contents/?exporting-image/javascript-ref/ECReferenceExport.html

 

Hope this helps!

Share this post


Link to post
Share on other sites

Hi sir

 

if i am using exportEnabled '1' in xml then it display one button..

Is it possible to hide that button? and Is it possible to replace that button with our custom button?

please provide the solution as soon as possible..

 

Thanks and regards

Sumit

Edited by sumit

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Please find the response to your queries inline below:

 

Is it possible to hide that button?

>> Could you please try once by setting "exportShowMenuItem" attribute to "0" in the <chart> element of your XML data?

Ref. Code:

<chart ...exportEnabled='1' exportShowMenuItem='0'>

 

Is it possible to replace that button with our custom button?

>>Yes, you can hide the default export button (as mentioned above) and then create your custom HTML button and can initiate export process by calling FusionCharts JavaScript function "exportChart()" from that function click.

 

But please note that you can not replace the default button with your custom button in the same position.

 

Hope this helps!

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