Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fusioncharts/fusionexport-node-client
Language SDK for FusionExport which enables exporting of charts & dashboards through NodeJS.
https://github.com/fusioncharts/fusionexport-node-client
fusionexport
Last synced: 5 days ago
JSON representation
Language SDK for FusionExport which enables exporting of charts & dashboards through NodeJS.
- Host: GitHub
- URL: https://github.com/fusioncharts/fusionexport-node-client
- Owner: fusioncharts
- Created: 2017-12-01T10:36:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T19:22:15.000Z (almost 2 years ago)
- Last Synced: 2024-09-20T05:52:09.981Z (about 2 months ago)
- Topics: fusionexport
- Language: HTML
- Size: 1.23 MB
- Stars: 4
- Watchers: 11
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FusionExport Node Client
Node.js SDK for FusionExport. Enables exporting from Node.js using FusionExport.
## Installation
To install this module, simply use npm:```bash
npm install --save fusionexport-node-client
```## Usage
To require the SDK into your project:
```js
const { ExportManager, ExportConfig } = require('fusionexport-node-client');
```## 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.
```js
// Require FusionExport components
const { ExportManager, ExportConfig } = require('fusionexport-node-client');// Instantiate ExportManager
const exportManager = new ExportManager();// Instantiate ExportConfig
const exportConfig = new ExportConfig();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',
},
],
},
};exportConfig.set('chartConfig', chartConfig);
// Export the chart by providing the exportConfig to the exportManager
exportManager.export(exportConfig, '.', true).then((exportedFiles) => {
exportedFiles.forEach(file => console.log(file));
}).catch((err) => {
console.log(err);
});
```## API Reference
You can find the full reference [here](https://www.fusioncharts.com/dev/exporting-charts/using-fusionexport/sdk-api-reference/nodejs.html).