Exporting Charts as PDF or Images > Batch export > Over-riding export parameters |
|||||||||||||||||||||||||||
Using the Export Component JavaScript object, you can also over-ride the export parameters that you've specified for each chart in XML. This is particularly useful in particular scenarios:
The list of parameters that can be over-ridden this way is as under: |
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
An Example | |||||||||||||||||||||||||||
Let's quickly see an example how to hide the Export dialog box of all charts during a batch process. To do so, we just add the following line to our export component code: | |||||||||||||||||||||||||||
<script type="text/javascript"> //Initialize Batch Exporter with DOM Id as fcBatchExporter var myExportComponent = new FusionChartsExportObject("fcBatchExporter", "../../FusionCharts/FCExporter.swf"); //Add the charts to queue. The charts are referred to by their DOM Id. myExportComponent.sourceCharts = ['myChartId1','myChartId2','myChartId3']; //------- Export related Attributes ------// myExportComponent.exportAttributes.showExportDialog = '0'; //------ Export Component Attributes ------// //Set the mode as full mode myExportComponent.componentAttributes.fullMode='1'; //Set saving mode as both. This allows users to download individual charts/ as well as download all charts as a single file. myExportComponent.componentAttributes.saveMode='both'; //Show allowed export format drop-down myExportComponent.componentAttributes.showAllowedTypes = '1'; //Cosmetics //Width and height myExportComponent.componentAttributes.width = '350'; myExportComponent.componentAttributes.height = '140'; //Message - caption of export component myExportComponent.componentAttributes.showMessage = '1'; myExportComponent.componentAttributes.message = 'Click on button above to begin export of charts. Then save from here.'; //Render the exporter SWF in our DIV fcexpDiv myExportComponent.Render("fcexpDiv"); </script> |
|||||||||||||||||||||||||||
As you can see above, the format is: export_object.exportAttributes.parameter='value'; When you run the above example and initiate batch export, you'll see that the capturing phase does not show export dialog any more. This saves you the trouble of specifying the parameter in each chart's XML. |