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;
}
}
}]
}
}
});
Try to replace yAxes to xAxes
- Chartjs-How to dynamically update Chartjs legend label colors?
- Chartjs-How to decrease white space of a card containing pie-chart in mobile view
Source:stackexchange.com