如何在chart.js?
中设置X轴标签的字体高度和偏移量以下是我的示例,您可以看到长名称标签的问题:https://jsfiddle.net/g30hp12f/2/
var myBarChart = new Chart(ctx, {
type: 'bar',
data: data,
options: {
scales: {
yAxes: [{
ticks: {
min: 0
}
}],
xAxes: [{
gridLines: {
display: false
},
ticks: {
maxRotation: 0,
minRotation: 0
}
}]
}
}
});