디버그: maxPriceDiff 및 중간/마지막 데이터 포인트 로그

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-02 12:42:29 +09:00
parent e3bcf4235d
commit a9806d3f5e
+8 -12
View File
@@ -71,18 +71,14 @@ class CloudRenderer implements IPrimitivePaneRenderer {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
target.useBitmapCoordinateSpace(({ context: ctx, horizontalPixelRatio: hpr, verticalPixelRatio: vpr }: any) => {
// 첫 번째 데이터 포인트 좌표 확인
const d0 = this._data[0];
const d1 = this._data[1];
const tx0 = timeScale.timeToCoordinate(d0.time as Time);
const tx1 = timeScale.timeToCoordinate(d1.time as Time);
const ay0 = this._series.priceToCoordinate(d0.spanA);
const by0 = this._series.priceToCoordinate(d0.spanB);
console.log('[IchimokuCloud] coords: x0=', tx0, 'x1=', tx1,
'spanA_price=', d0.spanA, 'spanA_y=', ay0,
'spanB_price=', d0.spanB, 'spanB_y=', by0,
'hpr=', hpr, 'vpr=', vpr,
'canvas_w=', ctx.canvas?.width, 'canvas_h=', ctx.canvas?.height);
// spanA/spanB 차이 진단
const maxPriceDiff = Math.max(...this._data.map(d => Math.abs(d.spanA - d.spanB)));
const mid = this._data[Math.floor(this._data.length / 2)];
const last = this._data[this._data.length - 1];
console.log('[IchimokuCloud] DATA CHECK: maxPriceDiff=', maxPriceDiff,
'| mid[', Math.floor(this._data.length / 2), '] spanA=', mid.spanA, 'spanB=', mid.spanB,
'| last spanA=', last.spanA, 'spanB=', last.spanB,
'canvas_w=', ctx.canvas?.width, 'canvas_h=', ctx.canvas?.height, 'hpr=', hpr, 'vpr=', vpr);
let drawn = 0, skippedTime = 0, skippedPrice = 0;
for (let i = 0; i < this._data.length - 1; i++) {