Char Charts
ES6 character based charting library
Installation
npm install char-charts
Functions
-
barChart(settings) ⇒
Array
-
Builds a bar chart.
Test chart Fruit ┌───────┬───────┬───────┬───────┬───────┬───────┐ Oranges ▐ ╵ ╵ ╵ ╵ │ │ Apples ▐███▌ ╵ ╵ ╵ ╵ │ │ Pears ▐███████╵ ╵ ╵ ╵ │ │ Apricots ▐████████████████████▌ ╵ ╵ │ │ Peaches ▐███████████████████████████████████████████████▌ Nuts │ ╵ ╵ ╵ ╵ │ │ Almond ▐▌ ╵ ╵ ╵ ╵ │ │ Peanut ▐ ╵ ╵ ╵ ╵ │ │ Pecan │ ╵ ╵ ╵ ╵ │ │ └───────┴───────┴───────┴───────┴───────┼───────┘ 0 20 40 60 80 100 120 Satisfaction
-
boxChart(settings) ⇒
Array.<string>
-
Builds a box and whisker chart.
String ╭─────────┬─────────┬─────────┬─────────┬─────────╮ │ · ╵ • ╵ ╵ ●• · │ concat │ · ╵ ┣━━━━━━━━━░░░░░░░░░░▓▓━┫ │ │ ╵ ╵ ╵ μ½: 90.00 ─╯ ···· length │ ╵ ╵ ╵ ╵ ┣░▓┫ Array │ ╭─ μ½: 13.00 ╵ ╵ μ½: 98.00 ─╯│ │· · ╵ · ╵ ╵ ╵ │ push │┣━░░░░▓▓▓━━┫ ╵ ╵ ╵ │ • ╵ ╵ ╵ ╵ │ concat ░ ── μ½: 0.15 ╵ ╵ ╵ │ │· ╵ ╵ ╵ ╵ │ shift │┃ ── μ½: 2.00 ╵ ╵ ╵ │ ╰─────────┴─────────┴─────────┴─────────┴─────────╯ 0 20 40 60 80 100 Ops/s
-
barChart(settings) ⇒
Array
-
Builds a stacked bar chart.
Test chart Fruit ╭────────┬─────────┬─────────┬─────────┬─────────╮ Oranges ▐███▒▒▒▒▒▒▒▒░░░░░░░░░░░░████████ │ │ Apples ▐█████▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░██████████ │ Pears ▐███████▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░██████████ │ Nuts │ ╵ │ ╵ │ │ Almond ▐███▒▒▒▒▒▒▒▒░░░░░░░░░░░░████████ │ │ Peanut ▐█████▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░██████████ │ ╰────────┴─────────┼─────────┴─────────┼─────────╯ 0 5 10 15 20 25