Skip to content

Commit 9fa1ead

Browse files
committed
Try to start y axes of charts at zero
1 parent 546d661 commit 9fa1ead

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

app/server.js

+16-6
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,14 @@ async function generateIncByWeekChart(numberOfDays) {
231231
},
232232
options: {
233233
scales: {
234-
y: {
235-
beginAtZero: true,
236-
},
234+
yAxes: [{
235+
ticks: {
236+
minor: {
237+
beginAtZero: true,
238+
min: 0
239+
}
240+
}
241+
}]
237242
},
238243
},
239244
});
@@ -266,9 +271,14 @@ async function generateIncByCategoryChart(numberOfDays) {
266271
},
267272
options: {
268273
scales: {
269-
y: {
270-
beginAtZero: true,
271-
},
274+
yAxes: [{
275+
ticks: {
276+
minor: {
277+
beginAtZero: true,
278+
min: 0
279+
}
280+
}
281+
}]
272282
},
273283
},
274284
});

0 commit comments

Comments
 (0)