Adição das casas decimais

This commit is contained in:
2026-06-22 19:24:30 -03:00
parent 56b3e146bf
commit 74391d5a0c
6 changed files with 23 additions and 9 deletions

View File

@@ -530,7 +530,7 @@
label: (ctx) => {
const idx = ctx.dataIndex;
return [
` Valor: R$ ${ctx.parsed.y.toFixed(2).replace('.', ',')}`,
` Valor: R$ ${ctx.parsed.y.toLocaleString('pt-BR', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
` Entregas: ${qtds[idx]}`
];
}
@@ -591,7 +591,7 @@
bodyColor: '#ffffff',
padding: 12,
callbacks: {
label: (c) => ` ${c.label}: R$ ${c.parsed.toFixed(2).replace('.', ',')}`
label: (c) => ` ${c.label}: R$ ${c.parsed.toLocaleString('pt-BR', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
}
}
}