chart js label wrap text code example
Example: chart.js label word wrap
scales: {
xAxes: [
{
ticks: {
callback: function(label, index, labels) {
if (/\s/.test(label)) {
return label.split(" ");
}else{
return label;
}
}
}
}
]
}