Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jstrace/chart
Ansi charts for nodejs
https://github.com/jstrace/chart
Last synced: 7 days ago
JSON representation
Ansi charts for nodejs
- Host: GitHub
- URL: https://github.com/jstrace/chart
- Owner: jstrace
- Created: 2014-02-27T16:59:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-05-16T04:17:48.000Z (over 2 years ago)
- Last Synced: 2024-09-21T10:18:55.219Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 233
- Watchers: 11
- Forks: 61
- Open Issues: 4
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
- awesome-nodejs-cn - ascii-charts - 终端下的 ASCII 柱状图 (包 / 命令行工具)
- awesome-nodejs-cn - ascii-charts - **star:233** 终端中的ASCII条形图 (包 / 命令行实用工具)
- awesome-nodejs - ascii-charts - ASCII bar chart in the terminal. (Packages / Command-line utilities)
- awesome-nodejs - chart - Ansi charts for nodejs - ★ 221 (Command-line utilities)
- awesome-node - ascii-charts - ASCII bar chart in the terminal. (Packages / Command-line utilities)
- awesome-nodejs-cn - ascii-charts - 终端中的ASCII条形图. (目录 / 命令行工具)
README
# Chart
Ascii bar chart for nodejs.
![](https://dl.dropboxusercontent.com/u/6396913/misc/Screen%20Shot%202014-02-27%20at%208.56.42%20AM.png)
## 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 ;)```js
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