我的代码:
var chart = new Chart('graph_data', {
type: 'line',
data: {
labels: data.labels.labels,
datasets: dataSets
},
options: {
responsive: true,
tooltips: {
mode: 'index',
intersect: false,
},
legend: {
display: true,
},
scales: {
xAxes: [{
display: true,
ticks: {
autoSkip: true,
maxRotation: 0,
},
scaleLabel: {
display: true,
labelString: attributeLabels[data.labels.type],
}
}],
yAxes: [{
display: true,
}]
}
}
});