Closed D4ni3l8 closed 1 year ago
Visit the preview URL for this PR (updated for commit 3ffda62):
https://adv-web-grp1--pr47-feature-dashboard-da-2um9i69p.web.app
(expires Mon, 01 May 2023 20:10:13 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Sign: e45f8bd17b7de44787580bea572e36aa09784b8c
current logic to filter for the age distribution is flat out wrong.
if (10 <= age <= 30) {
age10to30++;
}
else if (31 <= age <= 40) {
age31to40++;
}
else if (41 <= age <= 50) {
age41to50++;
}
else if (51 <= age <= 60) {
age51to60++;
}
else if (age > 60) {
above60++;
}
All documents will filter in the first condition
Proper way to do it:
if (age >= 10 && age <= 30) {
age10to30++;
}
else if (age >= 31 && age <= 40) {
age31to40++;
}
else if (age >= 41 && age <= 50) {
age41to50++;
}
else if (age >= 51 && age <= 60) {
age51to60++;
}
else if (age > 60) {
above60++;
}
Showing the myectomy pie chart.