모의투자, 백테스팅 레이아웃 수정

This commit is contained in:
Macbook
2026-05-24 20:13:21 +09:00
parent 958b813f3b
commit af230a4233
23 changed files with 2394 additions and 782 deletions
@@ -9,6 +9,8 @@ interface Props {
market: string;
theme?: Theme;
wsLabel?: string;
timeframe?: Timeframe;
onTimeframeChange?: (tf: Timeframe) => void;
}
function readChartTheme(container: HTMLElement | null) {
@@ -25,11 +27,19 @@ function readChartTheme(container: HTMLElement | null) {
};
}
const PaperMiniChart: React.FC<Props> = ({ market, theme = 'dark', wsLabel = 'WebSocket <100ms' }) => {
const PaperMiniChart: React.FC<Props> = ({
market,
theme = 'dark',
wsLabel = 'WebSocket <100ms',
timeframe: timeframeProp,
onTimeframeChange,
}) => {
const containerRef = useRef<HTMLDivElement>(null);
const chartRef = useRef<IChartApi | null>(null);
const seriesRef = useRef<ISeriesApi<'Candlestick'> | null>(null);
const [timeframe, setTimeframe] = useState<Timeframe>('1h');
const [timeframeInternal, setTimeframeInternal] = useState<Timeframe>('1h');
const timeframe = timeframeProp ?? timeframeInternal;
const setTimeframe = onTimeframeChange ?? setTimeframeInternal;
const [loading, setLoading] = useState(true);
const applyTheme = useCallback((chart: IChartApi, series: ISeriesApi<'Candlestick'>) => {