O'Reilly logo

FusionCharts by Shamasis Bhattacharya, Pallav Nadhani, Sanket Nadhani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — create a button to perform server-side export of the chart

  1. Create a copy of CustomizeClientSideExport.html and save it as ExportToServer.html
  2. Open this newly created HTML file with a text editor and append the following lines of code to the working<script> block (around line 44):
    function exportChartToServer () { if(chartObj.hasRendered && chartObj.hasRendered()) { chartObj.exportChart({ exportAtClient: '0', exportHandler: 'http://localhost/Export/FCExporter.php', exportCallback: 'showExportUrl', exportAction: 'save' }); document.getElementById("exporterContainer").innerHTML = "Exporting chart to server. Please wait..."; } else { alert("Please wait for the chart to render."); } } function showExportUrl (exportResult) { if (exportResult.statusCode ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required