Server to pre-render and serve radial plot images
This project uses node-canvas which binds to the Cairo to manipulate graphics on a low level.
Before running the server make sure you're all set following the node-canvas setup instructions.
git clone [email protected]:tancredi/ws-radial-plot-prerender.git
cd ws-radial-plot-prerender
npm install
To start the server, run npm start
.
The server will be started http://localhost:2000
or listen to a custom set by the PORT
environment variable.
GET /size/:size/?v=values[ &c=compare_values ]
- Render a shape of given size- size (
String
) - Standardised size of the rendered imagesmall : 250x250 | medium : 500x500 | large : 1000x1000
- v (values) (
[ Number ]
) - Comma-separated shape values. - c (compare_values) (
[ Number ]
) - Comma-separated compare shape values.
- size (
Example: /size/small/?v=20,15.0,10,12,92.0002,4,16.23,75,40,23&c=10,12,20.445,50,49,25.4,10,40,41,12.004
MIT
Copyright (c) 2014 Workshape.io Ltd