분석레포트 화면 추가

This commit is contained in:
Macbook
2026-06-03 15:57:02 +09:00
parent 3e17d6cfb8
commit a2ede568e0
48 changed files with 2593 additions and 94 deletions
@@ -54,6 +54,8 @@ interface Props {
/** 분석 레포트 팝업 (백테스팅 상단 툴바) */
onOpenReport?: () => void;
reportDisabled?: boolean;
/** 거래 로그 클릭 시 해당 시점으로 차트 이동 */
focusTimeSec?: number | null;
}
const noop = () => {};
@@ -105,6 +107,7 @@ const BacktestAnalysisChart: React.FC<Props> = ({
onToggleOverlay,
onOpenReport,
reportDisabled = false,
focusTimeSec = null,
}) => {
const { getParams, getVisualConfig } = useIndicatorSettings();
const { defaults: appDefaults } = useAppSettings();
@@ -300,6 +303,15 @@ const BacktestAnalysisChart: React.FC<Props> = ({
applyMarkers();
}, [signals, bars, applyMarkers]);
useEffect(() => {
if (focusTimeSec == null) return;
const mgr = managerRef.current;
if (!mgr) return;
const barSec = timeframeBarSeconds(timeframeRaw);
const pad = Math.max(barSec * 48, 3600);
mgr.applyVisibleTimeRange(focusTimeSec - pad, focusTimeSec + pad);
}, [focusTimeSec, timeframeRaw]);
useEffect(() => {
const mgr = managerRef.current;
if (mgr) applyPaneRatio(mgr);