A text-based, no-dependencies, open-source charting utility in JavaScript.
It is inspired by the Python library plainchart
.
import PlainChart from "@betterthings/plainchart";
const chart = new PlainChart([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9]);
console.log(chart.render());
/*
β β
β β
β β
β β β
ββ ββ ββ
ββ ββ ββ
β ββ ββ ββ
β β ββ βββββ
β β ββββββββ
ββββββββββββ
*/
Take a look at example.mjs
to see how to generate something like this:
ΓΓΓΓΓΓΓΓ ΓΓΓΓΓΓΓΓ
ΓΓΓ ΓΓΓ ΓΓΓ ΓΓΓ
ΓΓ ΓΓ ΓΓ ΓΓ
ΓΓ ΓΓ ΓΓ ΓΓ
Γ Γ Γ Γ
Γ ΓΓ ΓΓ ΓΓ Γ
ΓΓ ΓΓ ΓΓ ΓΓ
ΓΓ ΓΓ ΓΓ ΓΓ
ΓΓΓ ΓΓΓ ΓΓΓ ΓΓΓ
ΓΓΓΓΓΓΓΓ ΓΓΓΓΓΓΓΓ
node --experimental-modules example.mjs
Please feel free to open an issue to propose a new feature or point out a bug. You can also fork the PlainChart repository and submit a pull request.
- Florian HΓ€mmerle (@lusbuab) - Better Things Digital