Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 517 Bytes

1.2.4 ervy 命令行打印图表的库.md

File metadata and controls

29 lines (23 loc) · 517 Bytes

命令行打印图表的库。

Installation

npm install ervy

Usage

const ervy = require('ervy')
const { bar, pie, bullet, donut, gauge, scatter } = ervy
        
// Prepare data to render chart
const data = [
  { key: 'A', value: 30 },
  { key: 'B', value: 10 },
  { key: 'C', value: 50 }
]

// Then use any chartType you like, for example:
console.log(
  bar(data, [options])
)

参考