From cce55c63c1bbe3df260f056cfb58f83bd9b3bdbf Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Thu, 12 Feb 2026 23:26:10 +0100 Subject: [PATCH] docs: sync candlestick color spec from update-candle-colors change --- openspec/specs/chart-canvas/spec.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openspec/specs/chart-canvas/spec.md b/openspec/specs/chart-canvas/spec.md index 6e350c5..850b874 100644 --- a/openspec/specs/chart-canvas/spec.md +++ b/openspec/specs/chart-canvas/spec.md @@ -1,7 +1,7 @@ ## ADDED Requirements ### Requirement: Candlestick chart rendering -The system SHALL render candle data as a candlestick chart using the `lightweight-charts` library (v4). The chart MUST display OHLC data with standard candlestick visuals (green for bullish, red for bearish). The chart SHALL be a client-side React component. +The system SHALL render candle data as a candlestick chart using the `lightweight-charts` library (v4). The chart MUST display OHLC data with candlestick visuals using a black and white color scheme. Bullish candles SHALL have a white interior with black outline and black wicks. Bearish candles SHALL be completely black (black fill and black wicks). The chart SHALL be a client-side React component. #### Scenario: Chart renders candle data - **WHEN** candle data exists in the database and the page loads @@ -11,6 +11,14 @@ The system SHALL render candle data as a candlestick chart using the `lightweigh - **WHEN** no candle data exists in the database - **THEN** the chart area displays an empty chart with a prompt to upload CSV data +#### Scenario: Bullish candle appearance +- **WHEN** a candle's close price is higher than its open price (bullish) +- **THEN** the candle displays with white interior, black border, and black wick + +#### Scenario: Bearish candle appearance +- **WHEN** a candle's close price is lower than its open price (bearish) +- **THEN** the candle displays as completely black (black fill and black wick) + ### Requirement: Chart interactivity The chart SHALL support zooming (mouse wheel), panning (click and drag on time axis), and crosshair display (showing price/time on hover). These are built-in lightweight-charts behaviors that MUST be enabled.