주가 표시형식 수정
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { useRef, useEffect, useCallback, useState } from 'react';
|
||||
import type { ChartManager } from '../utils/ChartManager';
|
||||
import type { Drawing, DrawingPoint, DrawingToolId, Theme } from '../types';
|
||||
import { formatUnixDateTime } from '../utils/timezone';
|
||||
import { formatUpbitKrwPrice } from '../utils/safeFormat';
|
||||
|
||||
// ─── Hit-test ──────────────────────────────────────────────────────────────
|
||||
const HIT_RADIUS = 7; // px (CSS 좌표)
|
||||
@@ -1088,7 +1089,7 @@ function renderInfoLine(ctx: CanvasRenderingContext2D, d: Drawing, m: ChartManag
|
||||
ctx.strokeStyle = d.color; ctx.lineWidth = d.lineWidth ?? 1;
|
||||
ctx.beginPath(); ctx.moveTo(0, y); ctx.lineTo(cssW, y); ctx.stroke();
|
||||
const price = d.points[0].price;
|
||||
const label = price >= 1000 ? price.toLocaleString('ko-KR') : price.toFixed(4);
|
||||
const label = formatUpbitKrwPrice(price);
|
||||
ctx.font = 'bold 10px sans-serif';
|
||||
const tw = ctx.measureText(label).width + 8;
|
||||
ctx.fillStyle = d.color;
|
||||
|
||||
Reference in New Issue
Block a user