Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hellosean1025/node-echarts
Generate chart by echarts in nodejs.
https://github.com/hellosean1025/node-echarts
echarts node-echarts
Last synced: 19 days ago
JSON representation
Generate chart by echarts in nodejs.
- Host: GitHub
- URL: https://github.com/hellosean1025/node-echarts
- Owner: hellosean1025
- Created: 2016-11-30T08:34:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-16T04:01:28.000Z (about 4 years ago)
- Last Synced: 2024-05-21T13:53:51.883Z (7 months ago)
- Topics: echarts, node-echarts
- Language: JavaScript
- Homepage:
- Size: 10.5 MB
- Stars: 280
- Watchers: 17
- Forks: 89
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-echarts - node-echarts - 后台生成 Apache ECharts 图表 (Languages / Node.js)
README
# node-echarts
Generate chart by [Apache ECharts (incubating)](https://github.com/apache/incubator-echarts) in Nodejs.
### Install
OS | Command
----- | -----
OS X | `brew install pkg-config cairo pango libpng jpeg giflib`
Ubuntu | `sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++`
Fedora | `sudo yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel giflib-devel`
Solaris | `pkgin install cairo pango pkg-config xproto renderproto kbproto xextproto`
Windows | [Instructions on our wiki](https://github.com/Automattic/node-canvas/wiki/Installation---Windows)```
npm install node-echarts
```### Usage
```javascript
var node_echarts = require('node-echarts');
var config = {
width: 500, // Image width, type is number.
height: 500, // Image height, type is number.
option: {}, // Echarts configuration, type is Object.
//If the path is not set, return the Buffer of image.
path: '', // Path is filepath of the image which will be created.
enableAutoDispose: true //Enable auto-dispose echarts after the image is created.
}node_echarts(config)
```
### Config
|name|type|default|description|
|---|---|---|---|
|width|Number|500|Image width|
|height|Number|500|Image height|
|option|Object|{}|Echarts Options|
|path|String|-|Path is filepath of the image which will be created. If the path is empty, return buffer.|
|enableAutoDispose|Boolean|true|Enable auto-dispose echarts after the image is created.|