UNPKG

1.46 kBMarkdownView Raw
1```
2___________
3\_ _____/_________ _____.__.
4 | __)_\_ __ \ \/ < | |
5 | \| | \/\ / \___ |
6/_______ /|__| \_/ / ____|
7 \/ \/
8```
9[![Travis (.org)](https://img.shields.io/travis/chunqiuyiyu/ervy.svg?style=flat-square)](https://travis-ci.org/chunqiuyiyu/ervy)
10![GitHub](https://img.shields.io/github/license/chunqiuyiyu/ervy.svg?style=flat-square)
11[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)
12
13> Bring charts to terminal.
14
15## Preview
16
17[Ervy site](https://www.chunqiuyiyu.com/ervy)
18
19## Why build this
20There is no special reason, just because I love terminal and ASCII art. It's very cool! Hope you enjoy Ervy and make your terminal more beautiful.
21
22## Supported Chart types
23### Bar
24![](/site/imgs/bar.png)
25
26### Pie
27![](/site/imgs/pie.png)
28
29### bullet
30![](/site/imgs/bullet.png)
31
32### Donut
33![](/site/imgs/donut.png)
34
35### Gauge
36![](/site/imgs/gauge.png)
37
38### Scatter
39![](/site/imgs/scatter.png)
40
41## APIs
42
43## main function
44```js
45ervy.[chartType](data, options)
46```
47
48## render colored characters
49```js
50// foreground color
51ervy.fg(color, character)
52
53// background color
54ervy.bg(color, [length])
55```
56Supported color: black, red, green, yellow, blue, magenta, cyan and white.
57
58Use [demo](/demo/index.js) to understand how to combine APIs in actual code.
59
60## Documents
61Come soon...
62
63## License
64[MIT](./LICENSE)