forked from fxcosta/laravel-chartjs
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I am using the optionsRaw option as below: (Estou usando a opção de optionsRaw conforme abaixo:)
->optionsRaw('{
"responsive": true,
"plugins": {
"tooltip": {
"callbacks": {
"label": function(context) {
let label = context.dataset.label || "";
if (label) {
label += ": ";
}
if (context.parsed.y !== null) {
label += "R$ " + context.parsed.y.toLocaleString("pt-BR", {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
}
return label;
}
}
}
},
"scales": {
"y": {
"ticks": {
"callback": function(value, index, values) {
return "R$ " + value.toLocaleString("pt-BR", {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
}
}
}
}
}');
But it's not formatting the numbers. What's wrong with my code? (Mas ele não esta formatando os números. O que esta errado no meu código?)
Copilot
Metadata
Metadata
Assignees
Labels
No labels