ES6 character based charting library
npm install char-charts
-
barChart(settings) ⇒
Array.<string>
-
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 │ · ╵ ┣━━━━━━━━━░░░░░░░░░░▓▓━┫ │ │ ╵ ╵ ╵ Mdn: 90.00 ─╯ ···· length │ ╵ ╵ ╵ ╵ ┣░▓┫ Array │ ╭─ Mdn: 13.00╵ ╵ Mdn: 98.00 ─╯│ │· · ╵ · ╵ ╵ ╵ │ push │┣━░░░░▓▓▓━━┫ ╵ ╵ ╵ │ • ╵ ╵ ╵ ╵ │ concat ░ ── Mdn: 0.15 ╵ ╵ ╵ │ │· ╵ ╵ ╵ ╵ │ shift │┃ ── Mdn: 2.00 ╵ ╵ ╵ │ ╰─────────┴─────────┴─────────┴─────────┴─────────╯ 0 20 40 60 80 100 Ops/s
-
stackedBarChart(settings) ⇒
Array.<string>
-
Builds a stacked bar chart.
Test chart Fruit ╭────────┬─────────┬─────────┬─────────┬─────────╮ Oranges ████▒▒▒▒▒▒▒▒░░░░░░░░░░░░████████ │ │ Apples ██████▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░██████████ │ Pears ████████▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░██████████ │ Nuts │ ╵ │ ╵ │ │ Almond ████▒▒▒▒▒▒▒▒░░░░░░░░░░░░████████ │ │ Peanut ██████▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░██████████ │ ╰────────┴─────────┼─────────┴─────────┼─────────╯ 0 5 10 15 20 25