0👍
✅
var chart = new Chart(ctx, {
type: 'line',
data: data,
options: {
scales: {
yAxes: [{
ticks: {
// Include a dollar sign in the ticks
callback: function(value, index, values) {
return '$' + value;
}
}
}]
}
}
});
This is a sample code to format the y axis value from the documentation page of chartjs. You can use this callback to format your labels.
Source:stackexchange.com