I have created a simple app where a user is tracking their mood. A simple click of the button inserts the necessary data to a CloudKit database. So I consider each record as a 'transactional' record.
I am able to successfully query the data and present in a list view. I am able to sort and incorporate simple predicates.
I am now at a point in my development that I would like to add a pie chart based on the users data and I am not sure how to roll-up the data / group by the data / aggregate the data [I am not sure what the correct terminology is within Swift]
The pie chart would show the various moods that the exists in the CloudKit database and the slices would be sized based on the count of each mood.
Any guidance that you can provide would be greatly helpful!