This example shows how to export AnyChart charts to SVG or Image formats using NodeJS.
Last updated 3 years ago by anychart .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nodejs-image-generation-utility 
SYNC missed versions from official npm registry.

AnyChart - Robust JavaScript/HTML5 Chart library for any project

NPM Version NPM Downloads Package Quality

Node.js charts exporting command-line utility

This example shows how to build server-side charts exporting command-line utility using AnyChart charting library and Node.js module. In this example we will show how to generate SVG, PNG, Jpeg Images.


Clone this repository:

$ git clone

Navigate to the example folder:

$ cd ./nodejs-image-generation-utility

To run the example you have to install dependencies. Run the following command:

$ npm install

Notice! AnyChart NodeJS module requires ImageMagic to create JPG and PNG images. Visit Image Magic install page for details. Note for Windows users: you have to create environment variable as described in Image Magic: Advanced Windows Installation article.

To run the example with defaults you should just execute index.js file with nodejs:

 $ node index.js 
 Written to image.png file

Notice! Please refrain from using percent values in chart. In node js DOM emulation there is some problems with this and resulting image may be differ from the planned.


 -i, --input [value] - path to the input data file with a chart, a stage or an SVG file. Default: chart.js.
 -o, --output [value] - path to the output file. Default: image
 -t, --type [value] - type of output data. Default: png


  • jsdom (DOM environment for the chart rendering)
  • commander (for the console API)
  • anychart (AnyChart library)
  • anychart-nodejs (AnyChart nodejs export module)

Further Learning


AnyChart NodeJS integration sample includes two parts:

  • Code of the integration sample that allows to use Javascript library (in this case, AnyChart) with Node.js charts exporting command-line utility. You can use, edit, modify it, use it with other Javascript libraries without any restrictions. It is released under Apache 2.0 License.
  • AnyChart JavaScript library. It is released under Commercial license. You can test this plugin with the trial version of AnyChart. Our trial version is not limited by time and doesn't contain any feature limitations. Check details here.

If you have any questions regarding licensing - please contact us.


Current Tags

  • 1.2.4                                ...           latest (3 years ago)

4 Versions

  • 1.2.4                                ...           3 years ago
  • 1.2.3                                ...           3 years ago
  • 1.2.2                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (3)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2016 © |