디버그: maxPriceDiff 및 중간/마지막 데이터 포인트 로그
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -71,18 +71,14 @@ class CloudRenderer implements IPrimitivePaneRenderer {
|
|||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
target.useBitmapCoordinateSpace(({ context: ctx, horizontalPixelRatio: hpr, verticalPixelRatio: vpr }: any) => {
|
target.useBitmapCoordinateSpace(({ context: ctx, horizontalPixelRatio: hpr, verticalPixelRatio: vpr }: any) => {
|
||||||
// 첫 번째 데이터 포인트 좌표 확인
|
// spanA/spanB 차이 진단
|
||||||
const d0 = this._data[0];
|
const maxPriceDiff = Math.max(...this._data.map(d => Math.abs(d.spanA - d.spanB)));
|
||||||
const d1 = this._data[1];
|
const mid = this._data[Math.floor(this._data.length / 2)];
|
||||||
const tx0 = timeScale.timeToCoordinate(d0.time as Time);
|
const last = this._data[this._data.length - 1];
|
||||||
const tx1 = timeScale.timeToCoordinate(d1.time as Time);
|
console.log('[IchimokuCloud] DATA CHECK: maxPriceDiff=', maxPriceDiff,
|
||||||
const ay0 = this._series.priceToCoordinate(d0.spanA);
|
'| mid[', Math.floor(this._data.length / 2), '] spanA=', mid.spanA, 'spanB=', mid.spanB,
|
||||||
const by0 = this._series.priceToCoordinate(d0.spanB);
|
'| last spanA=', last.spanA, 'spanB=', last.spanB,
|
||||||
console.log('[IchimokuCloud] coords: x0=', tx0, 'x1=', tx1,
|
'canvas_w=', ctx.canvas?.width, 'canvas_h=', ctx.canvas?.height, 'hpr=', hpr, 'vpr=', vpr);
|
||||||
'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);
|
|
||||||
|
|
||||||
let drawn = 0, skippedTime = 0, skippedPrice = 0;
|
let drawn = 0, skippedTime = 0, skippedPrice = 0;
|
||||||
for (let i = 0; i < this._data.length - 1; i++) {
|
for (let i = 0; i < this._data.length - 1; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user