0
如何在Chart.js v2中向Y轴添加°C?这些值由Chart.js库自动生成。
这是我的代码:
var chartInstance = new Chart(ctx, {
type: 'bar',
data: data,
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:false
},
scaleLabel: {
display: true,
labelString: 'Temperature'
}
}]
},
title: {
display: true,
text: 'Weather Graph'
}
}
这正是我正在寻找。谢谢 – Roman