very simple line-graph
Want to see pretty graphs? Log in now!
npm install line-graph
|5||downloads in the last week|
|41||downloads in the last month|
|Last Published By|
|Version||1.0.6 last updated 20 days ago|
|Dependencies||dat-table, optimist, color, canvas|
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.
npm install line-graph -g line-graph < data.csv > graph.png --title "Graph o'Data"
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.