Pure-SVG bar chart that renders one rect per data point (none for a value that is not finite), in vertical (default) or horizontal orientation, with crisp pixel edges or smoothed linear corners.
Tone-aware fills via retro-* token classes — matches the rest of the kit.
Three sizes (sm/md/lg) with sensible inner padding and gap math.
Vertical or horizontal orientation with auto-normalized [yMin..yMax] scale.
Optional inline value labels above (vertical) or after (horizontal) each bar.
Surface-aware: pixel uses crispEdges + square corners, linear smooths to rx=2.
Status
stable
Category
data
Since
v1.9.0
API
import { PixelBarChart } from '@pxlkit/ui-kit';
Prop
Type
Default
Description
data* (required)
PixelChartDataPoint[]
—
The series, one bar per point; one whose y is not finite leaves its slot empty.
Surface override; defaults to the nearest provider.
bordered
boolean
false
Render with surface-aware border + radius chrome. Defaults to false (no chrome).
Also takes the native attributes and event handlers of <svg> (SVGAttributes<SVGSVGElement>).
ref points to <svg>.
Accessibility
WCAG target: 2.1 AA
img
The SVG renders as role="img" with an auto-derived aria-label summarizing the series (kind, point count and min..max range of its finite values — a point whose y is NaN or ±Infinity is left out of the chart and of the summary, which reads "bar chart, no data" when no value is finite). Pass a custom aria-label for richer context. For full data accessibility, render a visually-hidden <table> sibling with sr-only that mirrors the data points — assistive tech then has a tabular fallback to read.