1๐
โ
Y-axis can be formatted in the options => scales => yAxis => ticks. There you can format the label with the same style with the tooltip.
options={
{
tooltips: {
callbacks: {
label: (tooltipItems, data) => {
return `${currencyFormatter(tooltipItems.value)}`
}
}
},
scales:{
yAxes:[
{
ticks: {
callback: function(label, index, labels) {
return `${currencyFormatter(label)}`
}
},
}
]
}
}
}
Source:stackexchange.com