An open API service indexing awesome lists of open source software.

https://github.com/workshape/ws-radial-plot-prerender-server

Server to pre-render and serve radial plot images
https://github.com/workshape/ws-radial-plot-prerender-server

Last synced: about 1 year ago
JSON representation

Server to pre-render and serve radial plot images

Awesome Lists containing this project

README

          

![Example shapes generated by the prerender server](http://i.cubeupload.com/UvJ4hJ.png)

> Server to pre-render and serve radial plot images

# Prerequisites

This project uses [node-canvas](https://github.com/Automattic/node-canvas) which binds to the [Cairo](http://cairographics.org/) to manipulate graphics on a low level.

Before running the server make sure you're all set following the [node-canvas setup instructions](https://github.com/Automattic/node-canvas#installation).

# Setup

```bash
git clone git@github.com:tancredi/ws-radial-plot-prerender.git
cd ws-radial-plot-prerender
npm install
```

# Running

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.

# Endpoints

* `GET /size/:size/?v=values[ &c=compare_values ]` - *Render a shape of given size*
* **size** (`String`) - Standardised size of the rendered image `small : 250x250 | medium : 500x500 | large : 1000x1000`
* **v** (values) (`[ Number ]`) - Comma-separated shape values.
* **c** (compare_values) (`[ Number ]`) - Comma-separated compare shape values.

**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`

# License

MIT

Copyright (c) 2014 Workshape.io Ltd