【发布时间】:2016-09-15 09:11:55
【问题描述】:
如何在 Chart.js v2 中将 °C 添加到 Y 轴?这些值由 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'
}
}
【问题讨论】: