주가 표시형식 수정

This commit is contained in:
Macbook
2026-06-06 00:56:45 +09:00
parent 1d4e606f77
commit 94d3f92bb9
18 changed files with 156 additions and 57 deletions
+2 -1
View File
@@ -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;