Help with Chart Group By Count

I have a dmx bar chart that I need to base on a server connect API (as returned below)
I cannot get it to group by activity_type and then count each in the chart datasource

{
  "apiActivityCount": {
    "status": 200,
    "headers": {
      "content-type": "application/json;charset=UTF-8",
      "access-control-allow-origin": "*",
      "date": "Thu, 03 Sep 2020 08:54:19 GMT",
      "connection": "close"
    },
    "data": {
      "$totalResults": 4,
      "$resources": [
        {
          "$key": 16754,
          "$title": "",
          "activity_Id": 16754,
          "activity_type": "Email"
        },
        {
          "$key": 16755,
          "$title": "",
          "activity_Id": 16755,
          "activity_type": "Holiday"
        },
        {
          "$key": 16750,
          "$title": "",
          "activity_Id": 16750,
          "activity_type": "Email"
        },
        {
          "$key": 16756,
          "$title": "",
          "activity_Id": 16756,
          "activity_type": "Email"
        },
        {
          "$key": 16757,
          "$title": "",
          "activity_Id": 16757,
          "activity_type": "Meeting"
        }
      ]
    }
  }
}

Help would be really appreciated.

Community Page
Last updated: