Charts
Stream chart
A live time series for telemetry: newest sample at the right edge, limits, and anything past a limit in red.
npx dtheo@latest add stream-chartLive torqueRA-14 hip pitch · Bench 3 · 1 kHz
A live chart. The latest values are listed above it; crossing a limit is announced.
- Command
- – N·m
- Measured
- – N·m
When to use
- Live bench and test-rig telemetry at up to a few kHz
- Watching a signal against a limit while a test runs
- Reviewing a finished capture: use Line chart, which reads with the keyboard
- Values that change a few times a minute: use Metric with a Sparkline
API
stream- A ring buffer from `createStream(channels, capacity)`. Push samples into it as fast as they arrive; the chart draws once per frame.
Stream series- Which channels to draw, with label, tone, width, unit and digits.
StreamSeries[] window= 10000- History on screen, in milliseconds.
number yDomain- A fixed y range, so the trace does not jump.
[number, number] limits- Dashed lines; give a channel and the part of its trace past the limit turns critical.
StreamLimit[] paused= false- Freeze the view while samples keep buffering.
boolean
Accessibility
- The latest values are text above the plot, with the word "over limit" when one is, never color alone.
- Crossing a limit is announced politely, at most once every ten seconds.
- With reduced motion on, the chart updates four times a second instead of scrolling smoothly.
- Drawing stops while the chart is off screen or the tab is hidden.