From b28c0ff75fcd9bc5751a01e668c50d5a11a77f07 Mon Sep 17 00:00:00 2001 From: Chris Amow Date: Wed, 26 Aug 2026 03:40:42 -0500 Subject: [PATCH] =?UTF-8?q?Widen=20the=20price=20scale=20so=207687.00=20?= =?UTF-8?q?=E2=86=90=20fits=20after=20the=20label.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The axis was sized to the digits; there was no leftover strip. --- static/chart.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/chart.js b/static/chart.js index 5dd7ef1..ff229f1 100644 --- a/static/chart.js +++ b/static/chart.js @@ -448,7 +448,10 @@ class ConfluenceChart { // The default leaves a tenth of the pane empty beneath the lowest bar, // which is where the volume draws and where a cursor tracing swing lows // naturally sits — far from any actual price. Give most of it back. - this.chart.priceScale('right').applyOptions({ scaleMargins: { top: 0.12, bottom: 0.04 } }); + this.chart.priceScale('right').applyOptions({ + scaleMargins: { top: 0.12, bottom: 0.04 }, + minimumWidth: 72, + }); // Whitespace to the right of the last bar. Lightweight Charts only labels // times that exist on the scale, so the axis under the projection area was // blank — you could watch two trendlines converge and not know when. These @@ -965,7 +968,8 @@ class ConfluenceChart { const chart = this.chartEl.getBoundingClientRect(); const plot = canvas.getBoundingClientRect(); this.currentPriceRight.style.top = `${Math.round(plot.top - chart.top + y - 8)}px`; - this.currentPriceRight.style.left = `${Math.max(0, this.chartEl.clientWidth - 16)}px`; + const scale = Math.round(chart.right - plot.right); + this.currentPriceRight.style.left = `${Math.round(plot.right - chart.left + Math.max(scale, 72) - 14)}px`; } }