From c7cf662da2ac7b51a3066e5b5c4065202dc120d3 Mon Sep 17 00:00:00 2001 From: DiTus Date: Wed, 18 Mar 2026 23:11:32 +0100 Subject: [PATCH] Set priceFormat precision 0 for chart series to display integer prices --- js/ui/chart.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/js/ui/chart.js b/js/ui/chart.js index 16ba4ba..61a0a73 100644 --- a/js/ui/chart.js +++ b/js/ui/chart.js @@ -324,15 +324,16 @@ constructor() { }); this.candleSeries = this.chart.addSeries(LightweightCharts.CandlestickSeries, { - upColor: '#ff9800', - downColor: '#ff9800', - borderUpColor: '#ff9800', - borderDownColor: '#ff9800', - wickUpColor: '#ff9800', - wickDownColor: '#ff9800', - lastValueVisible: false, - priceLineVisible: false, - }, 0); + upColor: '#ff9800', + downColor: '#ff9800', + borderUpColor: '#ff9800', + borderDownColor: '#ff9800', + wickUpColor: '#ff9800', + wickDownColor: '#ff9800', + lastValueVisible: false, + priceLineVisible: false, + priceFormat: { type: 'price', precision: 0, minMove: 1 } + }, 0); this.avgPriceSeries = this.chart.addSeries(LightweightCharts.LineSeries, { color: '#00bcd4', @@ -340,9 +341,10 @@ constructor() { lineStyle: LightweightCharts.LineStyle.Solid, lastValueVisible: true, priceLineVisible: false, - crosshairMarkerVisible: false, + crosshairMarkerVisible: false, title: '', - }); + priceFormat: { type: 'price', precision: 0, minMove: 1 } +}); this.currentPriceLine = this.candleSeries.createPriceLine({ price: 0,