From dd53b13979094d44f239eb876c88c338fe228714 Mon Sep 17 00:00:00 2001 From: DiTus Date: Wed, 18 Mar 2026 23:06:10 +0100 Subject: [PATCH] Set priceFormat precision 0 for LineSeries and BaselineSeries to hide decimals --- js/ui/indicators-panel-new.js | 42 ++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/js/ui/indicators-panel-new.js b/js/ui/indicators-panel-new.js index 1abb654..287e18b 100644 --- a/js/ui/indicators-panel-new.js +++ b/js/ui/indicators-panel-new.js @@ -911,28 +911,30 @@ function renderIndicatorOnPane(indicator, meta, instance, candles, paneIndex, li lastValueVisible: false }, paneIndex); } else if (plot.type === 'baseline') { - series = window.dashboard.chart.addSeries(LightweightCharts.BaselineSeries, { - baseValue: { type: 'price', price: plot.baseValue || 0 }, - topLineColor: plot.topLineColor || plotColor, - topFillColor1: plot.topFillColor1 || plotColor, - topFillColor2: '#00000000', - bottomFillColor1: '#00000000', - bottomColor: plot.bottomColor || '#00000000', - lineWidth: plot.width || indicator.params._lineWidth || lineWidth, - lineStyle: plotLineStyle, - title: plot.title || '', - priceLineVisible: false, - lastValueVisible: plot.lastValueVisible !== false - }, paneIndex); + series = window.dashboard.chart.addSeries(LightweightCharts.BaselineSeries, { + baseValue: { type: 'price', price: plot.baseValue || 0 }, + topLineColor: plot.topLineColor || plotColor, + topFillColor1: plot.topFillColor1 || plotColor, + topFillColor2: '#00000000', + bottomFillColor1: '#00000000', + bottomColor: plot.bottomColor || '#00000000', + lineWidth: plot.width || indicator.params._lineWidth || lineWidth, + lineStyle: plotLineStyle, + title: plot.title || '', + priceLineVisible: false, + lastValueVisible: plot.lastValueVisible !== false, + priceFormat: { type: 'price', precision: 0, minMove: 1 } + }, paneIndex); } else { series = window.dashboard.chart.addSeries(LightweightCharts.LineSeries, { - color: plotColor, - lineWidth: plot.width || indicator.params._lineWidth || lineWidth, - lineStyle: plotLineStyle, - title: '', - priceLineVisible: false, - lastValueVisible: plot.lastValueVisible !== false - }, paneIndex); + color: plotColor, + lineWidth: plot.width || indicator.params._lineWidth || lineWidth, + lineStyle: plotLineStyle, + title: '', + priceLineVisible: false, + lastValueVisible: plot.lastValueVisible !== false, + priceFormat: { type: 'price', precision: 0, minMove: 1 } + }, paneIndex); } series.setData(data);