CHAPTER 3 · CH

Chart: Candles, Aggregation, MAs, Volume

CH-01The primary chart type MUST be candlestick. Line and bar chart types MUST be offered as alternatives on the same aggregation.
CH-02Aggregation is by distance windows only. Selectable window sizes MUST be exactly: 100 m, 250 m, 500 m, 1 km, 2 km, 5 km, 10 km. Candle boundaries fall at multiples of the window along cumulative distance; the final candle MAY be partial.
CH-03A track shorter than the selected window produces exactly one candle (a 1500 m run at 10 km window is one candle; at 500 m it is three).
CH-04Candle OHLC within a window MUST read from the canonical speed curve (GX-06): open = speed at window start, close = speed at window end, high/low = max/min of the curve inside the window.
CH-05Two moving averages MUST be overlaid, computed over candle closes (so their meaning shifts with window size, exactly like MA(20)/MA(50) on a real chart). Periods MUST be configurable; defaults MA(20) and MA(50).
CH-06A volume panel below the price chart MUST show net elevation delta per window as zero-centered bars: net gain above zero (green), net loss below (red).
CH-07The chart MUST support horizontal zoom (mouse wheel) and pan (drag) along the distance axis, with the y-axis auto-scaling to the visible range — standard terminal behaviour.
CH-08Alternative views on the same candles: line = closes; bar = classic OHLC bars.
CH-09If the GPX contains no elevation data, the volume panel MUST remain visible but empty with a subtle “no elevation data” note — the layout stays stable.
CH-10A crosshair MUST track the pointer, showing per-candle tooltip data: window range (e.g. 2.0–2.5 km), OHLC in km/h, pace equivalents in min/km, and elevation delta.