Skip to content

Commit

Permalink
Try to start y axes of charts at zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinan-96 committed Oct 4, 2024
1 parent 546d661 commit 4bf8791
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,14 @@ async function generateIncByWeekChart(numberOfDays) {
},
options: {
scales: {
y: {
beginAtZero: true,
},
yAxes: [{
ticks: {
minor: {
beginAtZero: true,
min: 0
}
}
}]
},
},
});
Expand Down Expand Up @@ -266,13 +271,19 @@ async function generateIncByCategoryChart(numberOfDays) {
},
options: {
scales: {
y: {
beginAtZero: true,
},
yAxes: [{
ticks: {
major: {
beginAtZero: true,
min: 0
}
}
}]
},
},
});
chart.setWidth(800);
chart.setHeight(400);
console.log("url", chart.getUrl());
return chart.getUrl();
}

0 comments on commit 4bf8791

Please sign in to comment.