Lumen
A tiny charting library for crisp, accessible dashboards — no runtime framework, no virtual DOM, just SVG.
- Year
- 2024
- Role
- Design, frontend
- Status
- Archived
- Stack
- TypeScript
- SVG
- Vite
- Links
- Source
Lumen started as an internal chart kit and became a small open-source library. The goal was modest: line, bar, and area charts that look good, load fast, render accessibly, and fit in about 12 kB.
Why another chart library?
Most options are either enormous or opinionated about layout. Lumen only draws the chart. Axes, ticks, and tooltips are all SVG and CSS, which means they inherit the page’s theme and can be styled with the same variables as everything else.
import { line } from 'lumen';
line(document.querySelector('#chart'), {
data: points,
x: (d) => d.date,
y: (d) => d.value,
label: 'Requests per second',
});
Decisions
- Server-renderable. The output is plain SVG markup, so charts can be pre-rendered and hydrated only when interactivity is requested.
- No canvas. For dashboards, SVG wins: it is inspectable, styleable, and crisp at any zoom.
- Accessible by default. Every chart emits a
<title>, a<desc>, and a visually hidden data table. Screen readers get the same information as sighted users. - CSS-first theming. Colours come from custom properties. Dark mode is one media query, not a JavaScript configuration object.
What I would change
The interaction layer is the weak point. Pointer handling for tooltips works, but keyboard navigation across data points was an afterthought and never felt finished. The library is archived now, but the rendering core still runs in two internal dashboards and the accessibility approach has outlived it.