diff --git a/openspec/changes/update-candle-colors/.openspec.yaml b/openspec/changes/archive/2026-02-12-update-candle-colors/.openspec.yaml similarity index 100% rename from openspec/changes/update-candle-colors/.openspec.yaml rename to openspec/changes/archive/2026-02-12-update-candle-colors/.openspec.yaml diff --git a/openspec/changes/update-candle-colors/design.md b/openspec/changes/archive/2026-02-12-update-candle-colors/design.md similarity index 96% rename from openspec/changes/update-candle-colors/design.md rename to openspec/changes/archive/2026-02-12-update-candle-colors/design.md index 47408dd..d0edd1b 100644 --- a/openspec/changes/update-candle-colors/design.md +++ b/openspec/changes/archive/2026-02-12-update-candle-colors/design.md @@ -27,7 +27,7 @@ The lightweight-charts library configures candlestick colors through the `addCan ### Decision 1: Color Values - **Up candles**: `upColor: '#ffffff'`, `borderUpColor: '#000000'`, `wickUpColor: '#000000'`, `borderVisible: true` -- **Down candles**: `downColor: '#000000'`, `wickDownColor: '#000000'` +- **Down candles**: `downColor: '#000000'`, , `borderDownColor: '#000000'`, `wickDownColor: '#000000'` **Rationale**: Pure white (`#ffffff`) and pure black (`#000000`) provide maximum contrast and match traditional financial charting conventions. Borders must be visible for up candles to show the black outline. diff --git a/openspec/changes/update-candle-colors/proposal.md b/openspec/changes/archive/2026-02-12-update-candle-colors/proposal.md similarity index 100% rename from openspec/changes/update-candle-colors/proposal.md rename to openspec/changes/archive/2026-02-12-update-candle-colors/proposal.md diff --git a/openspec/changes/update-candle-colors/specs/chart-canvas/spec.md b/openspec/changes/archive/2026-02-12-update-candle-colors/specs/chart-canvas/spec.md similarity index 100% rename from openspec/changes/update-candle-colors/specs/chart-canvas/spec.md rename to openspec/changes/archive/2026-02-12-update-candle-colors/specs/chart-canvas/spec.md diff --git a/openspec/changes/update-candle-colors/tasks.md b/openspec/changes/archive/2026-02-12-update-candle-colors/tasks.md similarity index 100% rename from openspec/changes/update-candle-colors/tasks.md rename to openspec/changes/archive/2026-02-12-update-candle-colors/tasks.md diff --git a/src/components/CandleChart.tsx b/src/components/CandleChart.tsx index 5324d5e..8dbce58 100644 --- a/src/components/CandleChart.tsx +++ b/src/components/CandleChart.tsx @@ -141,6 +141,7 @@ const CandleChart = forwardRef( wickUpColor: '#000000', wickDownColor: '#000000', borderUpColor: '#000000', + borderDownColor: '#000000', }); chartRef.current = chart; @@ -197,14 +198,14 @@ const CandleChart = forwardRef( if (!annotationType) return null; const isSelected = annotation.id === selectedLabelId; - + // Determine marker shape and position based on icon const isUpArrow = annotationType.icon === 'arrowUp'; - + return { time: annotation.timestamp as Time, position: isUpArrow ? ('belowBar' as const) : ('aboveBar' as const), - color: isSelected + color: isSelected ? annotationType.color + 'CC' // Add slight transparency when selected : annotationType.color, shape: isUpArrow ? ('arrowUp' as const) : ('arrowDown' as const), @@ -240,7 +241,7 @@ const CandleChart = forwardRef( if (markerType) { const timestamp = typeof time === 'string' ? Date.parse(time) / 1000 : (time as number); - + // Find nearest candle const nearestCandle = candles.reduce((prev, curr) => { return Math.abs(curr.time - timestamp) < Math.abs(prev.time - timestamp) ? curr : prev; @@ -274,7 +275,7 @@ const CandleChart = forwardRef( const markerTypeNames = annotationTypes .filter((t) => t.category === 'marker') .map((t) => t.name); - + // Find annotation at this timestamp (within tolerance) const tolerance = 60; // 60 seconds tolerance const annotation = annotations.find( @@ -303,13 +304,13 @@ const CandleChart = forwardRef( const isMarkerTool = annotationTypes.find( (t) => t.category === 'marker' && t.name === activeTool ); - + if (!activeTool || isMarkerTool) { const timestamp = typeof time === 'string' ? Date.parse(time) / 1000 : (time as number); const markerTypeNames = annotationTypes .filter((t) => t.category === 'marker') .map((t) => t.name); - + // Find annotation at this timestamp (within tolerance) const tolerance = 60; // 60 seconds tolerance const annotation = annotations.find(