I am trying to sort a group if items in my database by the number of times they have been recorded doing a thing, then I want to display that in a chart using the chart JS plugin.
Here is my example:
I have users who attend sessions at our office. At the end of each session the user gets a “score” for how they are doing. I would like to group all users who have had 20 sessions, then show the average score given to the users who have come 20 times. I’d like to do that for all session counts. Ideally the data will show that the more people attend our sessions, the higher the average user score will be.
The Y axis would be the average score for the users who have come to X sessions.
They X axis would be the group of users who have attended X sessions.
I’ve been stuck on this for a while. Does anyone know how I can do this?
Thanks!