Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justinmanley/playfair
Generate charts and graphs from the command line using d3 and PhantomJS.
https://github.com/justinmanley/playfair
Last synced: 16 days ago
JSON representation
Generate charts and graphs from the command line using d3 and PhantomJS.
- Host: GitHub
- URL: https://github.com/justinmanley/playfair
- Owner: justinmanley
- Created: 2014-08-06T21:34:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-09T04:44:23.000Z (over 10 years ago)
- Last Synced: 2024-10-22T06:29:55.075Z (21 days ago)
- Language: JavaScript
- Size: 875 KB
- Stars: 8
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
playfair
=====Generate charts and graphs from the command line using d3 and PhantomJS.
### Usage ###
Install playfair with
```
npm install -g playfair
```Then, you can render SVG graphics from JavaScript (produced using d3 or any other library with facilities for SVG drawing) with the command:
```
playfair .
```### Options ###
#### Output file: `-o --output`
By default, playfair saves SVG output to a file named `output.svg`. You can redirect this output with the `-o --output` option:
```
playfair index.html --output example.svg
```#### Selector: `-i --id`
By default, playfair retrieves the first SVG element from the document. You can pass in an id with the `-i --id` option:
```
playfair index.html --id example-id
```This will extract the first matching SVG node from the document using `document.querySelector("svg#example-id")`.