KQ-954 · PERCENTILE/LINES

Percentile Lines

Three percentiles over one window, drawn together: each line arrives by pathLength on glide, offset by cascade so they read as three strokes rather than one. The gap between neighbouring lines is the point — hovering a band shades it and thickens its two boundary lines on flick, and the spread row below names the same gap in words as roving-tabindex buttons where Left and Right step, Home and End jump, and a press latches the shading. Every path's d is set and never animated, because a hidden series re-pairs the bands.

KQ-954 · PERCENTILE/LINES
ledger-api
p50, p95 and p99 across 12 samples from 09:00 to 09:55, peaking at 388 milliseconds.
Samplep50p95p99
09:0046 milliseconds128 milliseconds206 milliseconds
09:0544 milliseconds124 milliseconds198 milliseconds
09:1047 milliseconds132 milliseconds214 milliseconds
09:1552 milliseconds156 milliseconds268 milliseconds
09:2058 milliseconds184 milliseconds322 milliseconds
09:2561 milliseconds212 milliseconds388 milliseconds
09:3057 milliseconds196 milliseconds356 milliseconds
09:3554 milliseconds168 milliseconds296 milliseconds
09:4049 milliseconds148 milliseconds252 milliseconds
09:4547 milliseconds138 milliseconds232 milliseconds
09:5045 milliseconds132 milliseconds218 milliseconds
09:5544 milliseconds126 milliseconds210 milliseconds

p95 max 212 ms · 3 of 3 shown

Install

One command — the source lands in your repo. Or copy it from the Code tab.

$ pnpm dlx shadcn@latest add @kinetiq/percentile-lines

Props

series
PercentileSeries[]
default
Ordered low to high: id, label and one value per sample.
samples
string[]
default
The x labels, one per value — the chart never reads a clock.
hidden / defaultHidden
string[]
default []
Controlled or initial ids of the hidden series.
onHiddenChange
(ids: string[]) => void
default
Fires from the press or key that hid or showed a series.
onBandChange
(band: BandReading | null) => void
default
The band under pointer or focus, with its widest spread; also fires on the first commit.
unit
string
default "ms"
Printed after every figure.
unitLong
string
default "milliseconds"
The same unit spoken in full, so every name and table cell is a sentence.
format
(value: number) => string
default rounded integer
Renders every value in the chart and its hidden table.
height
number
default 128
Plot height in px; the width is fluid.
label
string
default "Percentiles"
Names the chart and its hidden table.