Aggregate graphs by Multiple choice

I want to create an activity where students will choose a problem at the beginning of the activity using a multiple choice question. The problem will involve graphing. I am wondering if there is a way to aggregate their answers based on the problem they chose. I think I could do it by defining different functions on each slide (like A(x) for choice A, B(x) for choice B, etc.) but I am wondering if there is a way to only differentiate the coding when aggregating.

You can use conditionals for aggregate. Depending on what values you expect in an aggregate list, make your otherwise well out of that range:

numberList(`A`): when yourMCName.isSelected(1) aggregate(valueToCollectForA)
                 otherwise aggregate(1000)
numberList(`B`): when yourMCName.isSelected(2) aggregate(valueToCollectForB)
                 otherwise aggregate(1000)
...etc for other lists

In your graph, you can create new lists with the 1000s removed:

A_1=A[A<1000]
B_1=B[B<1000]