feat(chart): pass build indicator props
This commit is contained in:
@@ -13,6 +13,8 @@ type Props = {
|
|||||||
candles: Candle[];
|
candles: Candle[];
|
||||||
indicators: ChartIndicators;
|
indicators: ChartIndicators;
|
||||||
timeframe: string;
|
timeframe: string;
|
||||||
|
bucketSeconds: number;
|
||||||
|
seriesKey: string;
|
||||||
onTimeframeChange: (tf: string) => void;
|
onTimeframeChange: (tf: string) => void;
|
||||||
showIndicators: boolean;
|
showIndicators: boolean;
|
||||||
onToggleIndicators: () => void;
|
onToggleIndicators: () => void;
|
||||||
@@ -42,6 +44,8 @@ export default function ChartPanel({
|
|||||||
candles,
|
candles,
|
||||||
indicators,
|
indicators,
|
||||||
timeframe,
|
timeframe,
|
||||||
|
bucketSeconds,
|
||||||
|
seriesKey,
|
||||||
onTimeframeChange,
|
onTimeframeChange,
|
||||||
showIndicators,
|
showIndicators,
|
||||||
onToggleIndicators,
|
onToggleIndicators,
|
||||||
@@ -234,6 +238,7 @@ export default function ChartPanel({
|
|||||||
const pointer = pendingMoveRef.current;
|
const pointer = pendingMoveRef.current;
|
||||||
if (!pointer) return;
|
if (!pointer) return;
|
||||||
if (activeToolRef.current !== 'fib-retracement') return;
|
if (activeToolRef.current !== 'fib-retracement') return;
|
||||||
|
|
||||||
const start2 = fibStartRef.current;
|
const start2 = fibStartRef.current;
|
||||||
if (!start2) return;
|
if (!start2) return;
|
||||||
setFibDraft({ a: start2, b: pointer });
|
setFibDraft({ a: start2, b: pointer });
|
||||||
@@ -295,6 +300,8 @@ export default function ChartPanel({
|
|||||||
ema20={indicators.ema20}
|
ema20={indicators.ema20}
|
||||||
bb20={indicators.bb20}
|
bb20={indicators.bb20}
|
||||||
showIndicators={showIndicators}
|
showIndicators={showIndicators}
|
||||||
|
bucketSeconds={bucketSeconds}
|
||||||
|
seriesKey={seriesKey}
|
||||||
fib={fibRenderable}
|
fib={fibRenderable}
|
||||||
fibOpacity={fibEffectiveOpacity}
|
fibOpacity={fibEffectiveOpacity}
|
||||||
fibSelected={fibSelected}
|
fibSelected={fibSelected}
|
||||||
|
|||||||
Reference in New Issue
Block a user