Skip to content

Generate charts and graphs from the command line using d3 and PhantomJS.

Notifications You must be signed in to change notification settings

justinmanley/playfair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 <myfile.html>.

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").

About

Generate charts and graphs from the command line using d3 and PhantomJS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published