Add price format configuration to settings popup and apply to chart

This commit is contained in:
DiTus
2026-03-18 23:18:54 +01:00
parent c7cf662da2
commit 406c3d7b95
2 changed files with 18 additions and 0 deletions

View File

@ -319,6 +319,16 @@ constructor() {
},
},
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,
},
});