0👍
In the else
case you return an array
but you should return a string
. Remove the angle brackets and check if it works.
} else {
return corporation + " €" + valor.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."), "Inschrijfprijs : €" + total.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
}
Tooltip Callbacks from Chart.js documentation states
label
(…) Returns text to render for an individual item in the tooltip.
- Chartjs-How to dynamically update Chartjs legend label colors?
- Chartjs-How to remove excess lines on X axis using chartjs?
Source:stackexchange.com