모의투자, 백테스팅 레이아웃 수정
This commit is contained in:
@@ -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'>) => {
|
||||
|
||||
Reference in New Issue
Block a user