请帮助我从 Firebase 到 Chart.js 的 fillData 我不知道方法 filldata
var ctx = document.getElementById('myChart').getContext('2d');
var chart = new Chart(ctx, {
// The type of chart we want to create
type: 'line',
// The data for our dataset
data: {
labels: ['Sun', 'Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat'],
datasets: [{
label: 'Temperature',
borderColor: 'rgb(255, 0, 0)',
data: [40, 48, 51, 45,7,8,40]
}, {
label: 'Humidity',
borderColor: 'rgb(0, 0, 255)',
data: [0, 5, 26.8, 25.4,5,8,9],
type: 'line'
}],
labels: ['Sun', 'Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat']
},
[enter image description here][1]
options: {}
});
填充到 Temp,Hty 到 chartJS
狐的传说
摇曳的蔷薇
相关分类