Widen the price scale so 7687.00 ← fits after the label.
The axis was sized to the digits; there was no leftover strip.
This commit is contained in:
parent
e1e0e40c10
commit
b28c0ff75f
1 changed files with 6 additions and 2 deletions
|
|
@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue