(no title)
throwaway143829 | 2 years ago
At that point you could just use an SVG charting library. Good charting libraries will have code snippets readily available for line charts that you can copy/paste. SVG can be styled with CSS just like text.
"Simpler code" seems like the main benefit but it comes with a big "weirdness" factor as the tradeoff. I'd bet there's a super lightweight SVG charting lib somewhere out there which is about as simple as this while being much more standard. i.e. supports line charts only, and has the simple type signature `(number[]) => SVGElement`.
dy108|2 years ago
Btw that one-liner function is helper, you don't have to install it it, just do `String.fromCharCode(0x100 + value)` to render character.