learning FC

Export As Csv

Recommended Posts

hi,

i want to use json data to render the chart and export it as csv,

i have got "showExportDataMenuItem" , which provides provision to save data as csv but it works for xml data.

How can i do this for json data?

Share this post


Link to post
Share on other sites

Hey,

 

Welcome to FusionCharts Forum.

 

Yes, using JSON data, it is possible to copy the generated CSV data to clipboard for Flash Chart.

 

To allow export of data using context menu, you need to specify the following in data:

{

"chart":{

"showexportdatamenuitem":"1"

}....

} Hope this helps.

Share this post


Link to post
Share on other sites

thanks for replying but as i mentioned this property works for xml data, and i am using json data.

 

 

Hey,

 

Welcome to FusionCharts Forum.

 

Yes, using JSON data, it is possible to copy the generated CSV data to clipboard for Flash Chart.

 

To allow export of data using context menu, you need to specify the following in data:

{

"chart":{

"showexportdatamenuitem":"1"

}....

} Hope this helps.

Share this post


Link to post
Share on other sites

i regret that, i didnt mention that i am using javascript charts.

it is still not working. Pls help

 

Hey,

 

Please find the sample attached to copy JSON data to the clipboard.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hey,

 

Copying data to clipboard through context menu is not possible using JavaScript charts.

 

For JavaScript charts, make use of FusionCharts JavaScript API for data export, which returns the CSV data as string in your JavaScript code

 

Please find the modified sample which displays the CSV data while the chart finishes rendering.

 

Hope this helps.

csv_json_sample.zip

Share this post


Link to post
Share on other sites

Thanks , it worked.

 

Hey,

 

Copying data to clipboard through context menu is not possible using JavaScript charts.

 

For JavaScript charts, make use of FusionCharts JavaScript API for data export, which returns the CSV data as string in your JavaScript code

 

Please find the modified sample which displays the CSV data while the chart finishes rendering.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

I create my chart through the php connector:

 

$columnChart = new FusionCharts(
"line", 
"ex1" , 
"500", 
"235", 
"chart-1", 
"json", 
'{  
  "chart":
  {  
 "caption":"Trend (all countries)",
"xAxisName": "",

etc.

 

How can I activate the export to csv?

 

I tried to add "showexportdatamenuitem":"1", but it does not work.

 

Thank you in advance

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