Sessions UI: show decimal in scale for low money values (#23202)

This commit is contained in:
Thomas Speer 2025-08-23 19:41:54 +02:00 • committed by GitHub
parent e5c1b691ce
commit f775e9d7a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -325,10 +325,14 @@ export default defineComponent({
color: colors.muted,
},
ticks: {
callback: (value: number) =>
this.costType === TYPES.PRICE
? this.fmtMoney(value, this.currency, false, true)
: this.fmtNumber(value / 1e3, 0),
callback: (value: number) => {
if (this.costType === TYPES.PRICE) {
const showDecimals = this.suggestedMaxCost < 4;
return this.fmtMoney(value, this.currency, showDecimals, true);
} else {
return this.fmtNumber(value / 1e3, 0);
}
},
color: colors.muted,
maxTicksLimit: 6,
},