fix: use annotation's saved color for TrendLine instead of annotationType default color
This commit is contained in:
parent
c404e79678
commit
7901a1a257
1 changed files with 2 additions and 1 deletions
|
|
@ -30,6 +30,7 @@ interface Annotation {
|
||||||
id: number;
|
id: number;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
label_type: string;
|
label_type: string;
|
||||||
|
color: string | null;
|
||||||
geometry: {
|
geometry: {
|
||||||
startTime?: number;
|
startTime?: number;
|
||||||
startPrice?: number;
|
startPrice?: number;
|
||||||
|
|
@ -1087,7 +1088,7 @@ const CandleChart = forwardRef<CandleChartHandle, CandleChartProps>(
|
||||||
price: geometry.endPrice!,
|
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(
|
const trendLine = new TrendLine(
|
||||||
chartRef.current!,
|
chartRef.current!,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue