ExportManager acts as a client, sending the export chart configuration to the ExportServer and delivers the exported charts through the attached listeners. It extends the EventEmitter class.
options.host: This is used to specify the export server host; if not specified, the default value is used. The default host is 0.0.0.0.
options.port: This is used to specify the export server port; if not specified, the default value is used. The default port is 1337.
Exports charts and dashboards with the specified export configurations. This method returns promise.
FusionExport accepts multiple options at a time. Using the SDK, you can set different options while exporting.
The supported export configurations are as follows:
chartConfig- Sets the configuration of a single chart or multiple charts in an array.
inputSVG- Sets the path for the SVG file input.
templateFilePath- Sets the path of the HTML template used for dashboard export.
asyncCapture- It shows if the export process will wait for CAPTURE_EXIT event.
maxWaitForCaptureExit- Sets the maximum time FusionExport would wait for the CAPTURE_EXIT event to be triggered.
dashboardLogo- Sets the path to the logo file.
dashboardHeading- Sets the title of the dashboard.
dashboardSubheading- Sets the sub-title of the dashboard.
type- Sets the format of the output file.
exportFile- It shows the output filename template, along with the path.
exportAsZip- Sets if the chart(s) will be exported as a zip file or as individual file(s).
This event is called when the export is completed. The event callback is called with the list of exported files stored in an array.
This callback function is called with a single argument, and state during chart export. It emits events for every exporting step initiated from the server. This callback can be used to track the progress of export on the server during chart export.
If an error is encountered while exporting, this event is triggered with the exact error details.