Aggregating inputs from checkboxes component

I am not sure if this is really possible, and admittedly I have much to learn about the CL, but here goes.

In the activity below, students are supposed to indicate which Cumulative Homework problems they would like to review as a class. I would like to set up a visual representation of the aggregation of choices which changes in real time as students make choices.

Specifically, whether in table or graph format, I’d like the choices to be ranked, and to display the top 10 choices (with the number of students requesting each problem). I’ve provisionally set up a table, but I’m open to other ideas. Apologies for the rather primitive nature of this screen and thank you in advance for your helpful ideas.

Having students select a single question would be much easier, but this can be done. You need a list for each question. I would do something like this, so that you can just use total( ) for each list to make your bar graph or however you want to represent it.
(I think numberLists can only be created in graph or button CL’s.)
In graph CL:

numberList(`Q_1`): aggregate( when cb1.isSelected(1) 1 otherwise 0)
numberList(`Q_2`): aggregate( when cb1.isSelected(2) 1 otherwise 0)
numberList(`Q_3`): aggregate( when cb1.isSelected(3) 1 otherwise 0)

You could then do something like this as a bar graph:

Thank you for pointing me in the right direction. I will work at this… If I do succeed in making it work as I want, I’ll post the result here.

Thank you again!

I’ve finalized this screen. Thank you, @Daniel_Grubbs for the kind help. I’m attaching the finalized version here. The finalized version is Screen 2.

1 Like