Chartjs-Am using Chart.js and am trying to list the attendances for the last 7 days

0👍

You might be comparing Int value with some kind of object. Your item variable contains AttendanceID only and you are comparing this value to student object.

You may need to change your condition like this

repartitions.Add(students.Count(x=>x.Attendances.Select(o => o.AttendanceID.Equals(item)));

Leave a comment