Render min/max-decimated series as range bars / OHLC instead of a polyline #112
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #111 (the line/mean half). The decimation reduction is now tap-aware:
a bounded level series (exposure) reduces by per-bucket mean and renders as a
clean line; an envelope series (equity) keeps per-bucket min/max. But the
min/max series is still drawn as a uPlot polyline through the (min, max) pairs —
i.e. range data drawn as a line. That is acceptable for equity (its per-bucket range
is tiny against the curve, so it reads fine), but it is not the honest rendering: the
diagonal min→max segments imply a path the value did not take.
The right model (user, 2026-06-22)
low = min, close = last value in the bucket — the full faithful downsample).
Scope
This is a rendering-model change, NOT a hotfix:
one x per bucket carrying a range (lo/hi) for an envelope series and a single
value for a level series — so
Seriesbecomes line-shaped or band/OHLC-shaped;chart-viewer.jsbuildChartsdraws a range series as uPlot bars / a band(
uPlot.paths.barsor the band-fill feature), a level series as a line; OHLC is acustom candlestick path (the largest part);
.mjsguards (chart_viewer_build / gaps / xmode / label) assert onthe line-data shape and must be updated;
cli_run.rsE2E that assert on the injected series shape follow.A reasonable staging: range bars first (small, covers equity honestly), OHLC
candles only if the open/close direction is wanted.
context: surfaced demonstrating cut 2 (#108) — the exposure band; the mean/line half
shipped as #111, this is the deferred bar/OHLC half.
depends on: #111 (ReduceKind, the tap-aware reduction — the foundation this builds the
render shape on).
Closed as ratified drop (owner decision, 2026-07-21, idea-cull round): chart cosmetics. The honest core (the min/max polyline implies a false path) will resurface the moment chart work is next touched; nothing blocks on it meanwhile.