1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: generate dummy items for missing types in historic summary data

This commit is contained in:
Ferdinand Mütsch
2020-08-29 23:16:21 +02:00
parent 12cc4cd9cf
commit 82ed386359
4 changed files with 69 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ function draw() {
.map(p => {
return {
label: p.key,
data: [parseInt(p.total)],
data: [parseInt(p.total) / 60],
backgroundColor: getRandomColor(p.key)
}
})
@@ -68,6 +68,14 @@ function draw() {
legend: {
display: false
},
scales: {
xAxes: [{
scaleLabel: {
display: true,
labelString: 'Minutes'
}
}]
},
maintainAspectRatio: false,
onResize: onChartResize
}