From 7901a1a257fb461e3ec6ada00f46b56176d80a4b Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Tue, 17 Feb 2026 20:03:54 +0100 Subject: [PATCH] fix: use annotation's saved color for TrendLine instead of annotationType default color --- src/components/CandleChart.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/CandleChart.tsx b/src/components/CandleChart.tsx index a46b626..cb6a8c3 100644 --- a/src/components/CandleChart.tsx +++ b/src/components/CandleChart.tsx @@ -30,6 +30,7 @@ interface Annotation { id: number; timestamp: number; label_type: string; + color: string | null; geometry: { startTime?: number; startPrice?: number; @@ -1087,7 +1088,7 @@ const CandleChart = forwardRef( price: geometry.endPrice!, }; - const color = annotationTypes.find((t) => t.name === 'line')?.color || selectedColor; + const color = annotation.color || annotationTypes.find((t) => t.name === 'line')?.color || selectedColor; const trendLine = new TrendLine( chartRef.current!,