Skip to content

Commit

Permalink
[Class statistics] Credit distribution development: Fix edge case on …
Browse files Browse the repository at this point in the history
…categories
  • Loading branch information
valtterikantanen committed Oct 14, 2024
1 parent e206e2b commit ab7e5d0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ const getChartData = (students, timeSlots, programme, timeDivision, cumulative,

const [min, max] = limit

return (min === undefined || credits > min) && (max === undefined || credits <= max)
if (min == null) {
return credits < max
}
if (max == null) {
return credits >= min
}
return credits >= min && credits < max
})

data[rangeIndex][timeSlotIndex].y += 1
Expand Down

0 comments on commit ab7e5d0

Please sign in to comment.