Ansi charts for nodejs
JavaScript Makefile
Clone or download
Latest commit 27bef25 Oct 6, 2016
Permalink
Failed to load latest commit information.
examples Initial commit Feb 27, 2014
.gitignore Initial commit Feb 27, 2014
History.md 1.3.3 Oct 6, 2016
Makefile Initial commit Feb 27, 2014
Readme.md Add point character options to example Sep 5, 2016
index.js Update index.js Oct 6, 2016
package.json 1.3.3 Oct 6, 2016

Readme.md

Chart

Ascii bar chart for nodejs.

Installation

$ npm install jstrace/chart

Example

When data exceeds the available width the data will "roll" to the tail-end of the array. This may become an option in the future, but that's the default behaviour for now ;)

var chart = require('chart');
var clear = require('clear');

var data = [1, 2, ...];

clear();
console.log(chart(data, {
  width: 130,
  height: 30,
  pointChar: '',
  negativePointChar: ''
}));

License

MIT