0π
β
To modify the ChartJs
Y-axis
label , instead of passing string to scaleLabel
property we need to pass the closure function, which will modify the label text.
scaleLabel: function (value)
{
var label = "";
switch (parseInt(value))
{
case 1:
label = "Slow";
break;
case 2:
label = "Avg.";
break;
case 3:
label = "Fast";
break;
case 4:
label = "Exp.";
break;
}
return label;
}
This is undocumented feature of
chartJs
Source:stackexchange.com