diff --git a/services/frontend/src/components/PopulationDetails/CreditGainStats/CreditDistributionDevelopment.jsx b/services/frontend/src/components/PopulationDetails/CreditGainStats/CreditDistributionDevelopment.jsx index 5734249d29..8b4efea4ae 100644 --- a/services/frontend/src/components/PopulationDetails/CreditGainStats/CreditDistributionDevelopment.jsx +++ b/services/frontend/src/components/PopulationDetails/CreditGainStats/CreditDistributionDevelopment.jsx @@ -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