diff --git a/js/ui/chart.js b/js/ui/chart.js index cb897c3..b6300bc 100644 --- a/js/ui/chart.js +++ b/js/ui/chart.js @@ -313,27 +313,28 @@ constructor() { return TimezoneConfig.formatTickMark(time); }, }, - localization: { + localization: { timeFormatter: (timestamp) => { return TimezoneConfig.formatDate(timestamp * 1000); }, }, handleScroll: { - // Setup price format selector change handler - const priceSelect = document.getElementById("priceFormatSelect"); - if (priceSelect) { - priceSelect.addEventListener("change", (e) => { - const precision = parseInt(e.target.value); - this.chart.priceScale().applyOptions({ - priceFormat: { type: "price", precision: precision, minMove: precision===0 ? 1 : 0.0001 } - }); - }); - } - vertTouchDrag: false, - }, - }); - - this.candleSeries = this.chart.addSeries(LightweightCharts.CandlestickSeries, { + vertTouchDrag: false, + }, + }); + + // Setup price format selector change handler + const priceSelect = document.getElementById("priceFormatSelect"); + if (priceSelect) { + priceSelect.addEventListener("change", (e) => { + const precision = parseInt(e.target.value); + this.chart.priceScale().applyOptions({ + priceFormat: { type: "price", precision: precision, minMove: precision===0 ? 1 : 0.0001 } + }); + }); + } + + this.candleSeries = this.chart.addSeries(LightweightCharts.CandlestickSeries, { upColor: '#ff9800', downColor: '#ff9800', borderUpColor: '#ff9800',