Skip to content

makwarth/chart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ansi charts for nodejs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.6%
  • Makefile 3.4%