I'm using C3 donut chart,
But the label is too long and I need a word-break
like feature.
So I tried to set the following properties, non of them works
axis: {
x: {
tick: {
width: 100
}
}
},
legend: {
maxWidth: 100px;
},
Any ideas?
UPDATE
The tooltip.format.name function can partially solve this problem. But I'm unable to add newline here, tried "\n"
, <br/>
and
tooltip: {
format: {
name: function (name, ratio, id, index) {
if (name.length > 70) {
return name.substr(0, 70) + ' 
 ...'
} else {
return name
}
}
}
}