How to show the YAxis scale in this format with K(Thousand), M(Million) and B(Billion) in Chart.Js?
in Bar chart
See #2311
Is there any solution ?
I just add this one,
options: {
scales: {
yAxes: [{
ticks: {
// max: 5,
min: 200000,
stepSize: 200000,
callback : function(value,index,array) {
return (value < 1000000) ? value/1000 + 'K' : value/1000000 + 'M';
}
}
}]
}
}
Most helpful comment
I just add this one,
options: { scales: { yAxes: [{ ticks: { // max: 5, min: 200000, stepSize: 200000, callback : function(value,index,array) { return (value < 1000000) ? value/1000 + 'K' : value/1000000 + 'M'; } } }] } }