Skip to content

anychart-integrations/nodejs-export-server-application

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

AnyChart - Robust JavaScript/HTML5 Chart library for any project

NPM Version NPM Downloads Package Quality

Node.js charts exporting application

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

Running

Clone this repository:

$ git clone git@github.com:anychart-integrations/nodejs-export-server-application.git

Navigate to the example directory:

$ cd ./nodejs-export-server-application

To run this example you have to install dependencies. Run this 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.

And to run the export server you should just execute index.js file with nodejs:

$ node index.js
Export server listening on port 3000!

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.

Rules

 / - main page for input code of a chart
 /export - rule for post requests with stringified JavaScript code for export

Requirements

  • jsdom (DOM environment for chart rendering)
  • express (Web server)
  • body-parser (Node.js body parsing middleware)
  • anychart (AnyChart library)
  • anychart-nodejs (AnyChart nodejs export module)

Further Learning

License

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 application. 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. sales@anychart.com

Analytics

About

This example shows how to build server-side charts exporting application using AnyChart charting library and Node.js module.

Resources

License

Stars

Watchers

Forks

Packages

No packages published