Chart · ui · 48K
Chart
A dependency-free pixel chart kit: BarChart, LineChart, AreaChart, PieChart and Sparkline rasterised onto the 1px grid and filled with 8×8 one-bit patterns (or the 16-colour palette), with ticked axes, dotted grid lines, a pattern legend, a framed tooltip with selection handles, arrow-key reading and a hidden data table for screen readers.
Pass data, xKey and series [{ key, label, pattern?, color? }], or wrap charts in a ChartContainer with a shadcn-style config keyed by series (or pie slice name). Patterns: solid, dark, gray, light, dots, diagonal, diagonal-reverse, horizontal, vertical, grid, weave, bricks, white. color takes a palette name ("red", "dark-green"…) or any CSS colour. Charts take the container's width and a fixed height in px; there is no viewBox scaling, so every line stays one pixel. Not recharts: shadcn chart examples need porting.