실시간 차트 보조지표 값 소수점 표시

This commit is contained in:
Macbook
2026-05-30 10:39:50 +09:00
parent 33c2d4b337
commit c7ba13e7ed
23 changed files with 226 additions and 40 deletions
+22 -4
View File
@@ -117,8 +117,10 @@ export interface ChartSlotHandle {
setIndicators: (inds: IndicatorConfig[]) => void;
/** 크로스헤어 자석모드 설정 */
setCrosshairMagnet: (enabled: boolean) => void;
/** 가격축 라벨·설명 on/off */
/** 가격축 라벨·설명 on/off (캔들·보조지표 동일 값) */
setSeriesPriceLabelsEnabled: (enabled: boolean) => void;
setCandleAreaPriceLabelsEnabled: (enabled: boolean) => void;
setIndicatorAreaPriceLabelsEnabled: (enabled: boolean) => void;
/** 거래량 pane on/off */
setVolumeVisible: (visible: boolean) => void;
setPaneSeparatorOptions: (opts: ChartPaneSeparatorOptions) => void;
@@ -172,7 +174,9 @@ export interface ChartSlotProps {
magnetMode?: 'off' | 'weak' | 'strong';
/** 차트 우클릭 → 매수·매도 패널 자동 입력 */
onTradeOrderRequest?: (req: { market: string; price: number; side: 'buy' | 'sell' }, slotIndex: number) => void;
/** 보조지표 우측 가격축 라벨·설명 표시 */
/** 캔들 영역 오버레이 지표 가격축 라벨·설명 */
chartCandleAreaPriceLabels?: boolean;
/** 하단 보조지표 pane 가격축 라벨·설명 */
chartSeriesPriceLabels?: boolean;
/** 차트 하단 거래량 바 표시 */
chartVolumeVisible?: boolean;
@@ -206,6 +210,7 @@ const ChartSlot = forwardRef<ChartSlotHandle, ChartSlotProps>(function ChartSlot
onSymbolChange,
magnetMode = 'off',
onTradeOrderRequest,
chartCandleAreaPriceLabels = true,
chartSeriesPriceLabels = true,
chartVolumeVisible = true,
chartRealtimeSource = 'BACKEND_STOMP',
@@ -331,6 +336,12 @@ const ChartSlot = forwardRef<ChartSlotHandle, ChartSlotProps>(function ChartSlot
setSeriesPriceLabelsEnabled: (enabled: boolean) => {
managerRef.current?.setSeriesPriceLabelsEnabled(enabled);
},
setCandleAreaPriceLabelsEnabled: (enabled: boolean) => {
managerRef.current?.setCandleAreaPriceLabelsEnabled(enabled);
},
setIndicatorAreaPriceLabelsEnabled: (enabled: boolean) => {
managerRef.current?.setIndicatorAreaPriceLabelsEnabled(enabled);
},
setVolumeVisible: (visible: boolean) => {
managerRef.current?.setVolumeVisible(visible);
},
@@ -349,7 +360,11 @@ const ChartSlot = forwardRef<ChartSlotHandle, ChartSlotProps>(function ChartSlot
}, [magnetMode]);
useEffect(() => {
managerRef.current?.setSeriesPriceLabelsEnabled(chartSeriesPriceLabels);
managerRef.current?.setCandleAreaPriceLabelsEnabled(chartCandleAreaPriceLabels);
}, [chartCandleAreaPriceLabels]);
useEffect(() => {
managerRef.current?.setIndicatorAreaPriceLabelsEnabled(chartSeriesPriceLabels);
}, [chartSeriesPriceLabels]);
useEffect(() => {
@@ -855,6 +870,8 @@ const ChartSlot = forwardRef<ChartSlotHandle, ChartSlotProps>(function ChartSlot
drawingsVisible={!compactMode}
showHoverToolbar={!compactMode}
volumeVisible={chartVolumeVisible}
candleAreaPriceLabelsEnabled={chartCandleAreaPriceLabels}
indicatorAreaPriceLabelsEnabled={chartSeriesPriceLabels}
paneSeparatorOptions={chartPaneSeparator}
crosshairInfoVisible={chartCrosshairInfoVisible}
onCrosshair={data => {
@@ -873,7 +890,8 @@ const ChartSlot = forwardRef<ChartSlotHandle, ChartSlotProps>(function ChartSlot
} else {
pendingRealtimeBarRef.current = null;
}
mgr.setSeriesPriceLabelsEnabled(chartSeriesPriceLabels);
mgr.setCandleAreaPriceLabelsEnabled(chartCandleAreaPriceLabels);
mgr.setIndicatorAreaPriceLabelsEnabled(chartSeriesPriceLabels);
mgr.setVolumeVisible(chartVolumeVisible);
if (chartPaneSeparator) mgr.setPaneSeparatorOptions(chartPaneSeparator);
// Time sync: 가시 시간 범위 변화 구독