FusionExport Javascript Client
Javascript SDK for FusionExport. Enables exporting from browser using FusionExport.
Installation
To install this module, simply use npm:
npm install --save fusionexport-javascript-client
Usage
To import the SDK into your project:
;
Getting Started
Start with a simple chart export. For exporting a single chart just pass the chart configuration as you would have passed it to the FusionCharts constructor.
// Import FusionExport; const chartConfig = type: 'column2d' dataFormat: 'json' dataSource: chart: caption: 'Number of visitors last week' theme: 'ocean' subCaption: 'Bakersfield Central vs Los Angeles Topanga' data: label: 'Mon' value: '15123' label: 'Tue' value: '14233' label: 'Wed' value: '25507' ; // Instantiate FusionExport exporterconst exporter = host: 'api.fusionexport.com' port: 1337; // Call the function to automatically download the exported fileexporter;
API Reference
There is a lot more in this library. You can find the full reference here.