KQ-546 · CROSSHAIR/CHART

Crosshair Chart

A line chart you read with your hand. The trace draws itself on mount with pathLength on glide and the area fades in a beat behind it; moving a pointer snaps a crosshair to the nearest sample and the dot rides the line on flick, with a readout whose digits roll from a motion value instead of a re-render. The plot is a slider: Left and Right step one sample, Home and End jump to the ends, Escape clears the crosshair.

KQ-546 · CROSSHAIR/CHART
Apr 1Apr 30
  • Fernworks sessions: 30 points, 2,487 to 4,464
  • Apr 1: 2,487
  • Apr 2: 2,852
  • Apr 3: 3,120
  • Apr 4: 3,055
  • Apr 5: 3,241
  • Apr 6: 3,283
  • Apr 7: 3,045
  • Apr 8: 2,924
  • Apr 9: 2,933
  • Apr 10: 2,823
  • Apr 11: 2,872
  • Apr 12: 3,038
  • Apr 13: 3,270
  • Apr 14: 3,232
  • Apr 15: 3,629
  • Apr 16: 3,916
  • Apr 17: 3,884
  • Apr 18: 4,063
  • Apr 19: 3,850
  • Apr 20: 4,046
  • Apr 21: 3,860
  • Apr 22: 3,608
  • Apr 23: 3,463
  • Apr 24: 3,518
  • Apr 25: 3,795
  • Apr 26: 3,702
  • Apr 27: 4,029
  • Apr 28: 4,347
  • Apr 29: 4,383
  • Apr 30: 4,464

Hover or arrow-key the trace

Install

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

$ pnpm dlx shadcn@latest add @kinetiq/crosshair-chart

Props

points
CrosshairPoint[]
default
The series, left to right; each sample carries a label and a value.
format
(value: number) => string
default rounded en-US
Formats every number the chart says out loud, the rolling readout included.
height
number
default 200
Plot height in px. The width is fluid and measured, so nothing overhangs a phone.
label
string
default
Series name — the chart's accessible name and the readout's caption.
color
string
default var(--signal, var(--primary))
Trace and fill colour; any CSS colour, defaulting to the signal token.
onActiveChange
(index: number | null) => void
default
Fires with the index under the crosshair, or null when it clears.