protected function getOptions(): RawJs|array
{
$js = <<<'JS'
{
responsive: true,
maintainAspectRatio: false,
aspectRatio: 1,
plugins: {
tooltip: {
enabled: true,
intersect: false,
callbacks: {
label: function(context) {
let label = context.dataset.label || '';
const value = context.raw || 0;
return ' ' + label + ': ' + value.toLocaleString('de-DE', {style: 'currency', currency: 'EUR'});
},
}
},
},
}
JS;
return RawJs::make($js);
}
protected function getOptions(): RawJs|array
{
$js = <<<'JS'
{
responsive: true,
maintainAspectRatio: false,
aspectRatio: 1,
plugins: {
tooltip: {
enabled: true,
intersect: false,
callbacks: {
label: function(context) {
let label = context.dataset.label || '';
const value = context.raw || 0;
return ' ' + label + ': ' + value.toLocaleString('de-DE', {style: 'currency', currency: 'EUR'});
},
}
},
},
}
JS;
return RawJs::make($js);
}