我在配置yAxes刻度以显示多行标签时遇到问题 对于主要的xAxes标签,我可以将数组作为标签值传递,并分割
labels: [["Green", "Groen", "Verde"], "Yellow", "Red", "Purple", "Blue"]
我将第一个标签的字词很好地叠放在另一个标签下
但是,当我为yAxes做山姆时会打勾标签
scales: {
yAxes: [{
ticks: {
callback: function(label, index, labels) {
labels = [["Green", "Groen", "Verde"], "Yellow", "Red", "Purple", "Blue"]
}
}
}]
}
我得到了Green,Groen,Verde
任何想法如何创建多行yAxes刻度标签?