Skip to content

Commit fa0d7d1

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

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

app/server.js

+14-6
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,13 @@ async function generateIncByWeekChart(numberOfDays) {
231231
},
232232
options: {
233233
scales: {
234-
y: {
235-
beginAtZero: true,
236-
},
234+
yAxes: [{
235+
ticks: {
236+
beginAtZero: true,
237+
min: 0,
238+
precision: 0
239+
}
240+
}]
237241
},
238242
},
239243
});
@@ -266,9 +270,13 @@ async function generateIncByCategoryChart(numberOfDays) {
266270
},
267271
options: {
268272
scales: {
269-
y: {
270-
beginAtZero: true,
271-
},
273+
yAxes: [{
274+
ticks: {
275+
beginAtZero: true,
276+
min: 0,
277+
precision: 0
278+
}
279+
}]
272280
},
273281
},
274282
});

0 commit comments

Comments
 (0)