2.0.2 • Published 8 years ago

line-graph v2.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

line-graph

I wanted a graph that I could install with npm and pipe a csv to, so I wrote one.

Works both in js in the browser, and via command line.

example, terminal

with electro, use this as a cli too.

npm install -g electron-prebuilt electro line-graph

pipe a csv file into line-graph:

line-graph < table.csv

an electron window will open and display the graph!

or, pipe the output to a png file:

line-graph < table.csv > table.png

example, browser

var graph = require('line-graph')
var Table = require('dat-table')

var canvas = document.createElement('canvas')
var ctx = canvas.getContext('2d')

graph(ctx, Table.createTable(TABLE_OF_DATA_WITH_HEADERS), opts)

document.body.appendChild(canvas)

If your data has headers and units how dat-table likes it, you should get a pretty good graph the first time.

License

MIT

2.0.2

8 years ago

2.0.1

9 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.1

10 years ago