UNPKG

1.64 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[![Install Size](https://flat.badgen.net/packagephobia/install/ervy)](https://packagephobia.now.sh/result?p=ervy)
13
14> Bring charts to terminal.
15
16## Preview
17
18[Ervy site](https://www.chunqiuyiyu.com/ervy)
19
20## Why build this
21There 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.
22
23## Supported Chart types
24### Bar
25![](/site/imgs/bar.png)
26
27### Pie
28![](/site/imgs/pie.png)
29
30### Bullet
31![](/site/imgs/bullet.png)
32
33### Donut
34![](/site/imgs/donut.png)
35
36### Gauge
37![](/site/imgs/gauge.png)
38
39### Scatter
40![](/site/imgs/scatter.png)
41
42## APIs
43
44## main function
45```js
46ervy.[chartType](data, options)
47```
48
49## render colored characters
50```js
51// foreground color
52ervy.fg(color, character)
53
54// background color
55ervy.bg(color, [length])
56```
57Supported color: black, red, green, yellow, blue, magenta, cyan and white.
58
59Use [demo](/demo/index.js) to understand how to combine APIs in actual code.
60
61## Documents
62Coming soon...
63
64## License
65[MIT](./LICENSE)