Kendo UI Chart - Visualize count of returned JSON fields

2 posts, 0 answers
  1. Moses
    Moses avatar
    1 posts
    Member since:
    Apr 2016

    Posted 29 Jun Link to this post

    I want to display the counts of specific retrieved fields in my pie/donut chart.
    I'm retrieving data via REST and the result is in json format. The source is a list repeating values:
         Example: In the following list, I'd like to get a present the number (count) of completed responses; perhaps in a second chart present the breakdown of responses by location.
        var userResponse  = [
              {     User:  "Bob Smith", Status: "Completed", Location: "USA" },
              {     User:  "Jim Smith", Status: "In-Progress", Location: "USA" }, 
             {     User:  "Jane Smith", Status: "Completed", Location: "USA" },
             {     User:  "Bill Smith", Status: "Completed", Location: "Japan" },
             {     User:  "Kate Smith", Status: "In-Progress", Location: "Japan" },
             {     User:  "Sam Smith", Status: "In-Progress", Location: "USA" },
    My Initialization currently looks like this:


        dataSource: {

            data: data.d.results,

            group: {

                field: "Location",



        seriesDefaults: {

            type: "donut",


        series: [{

            field: 'Id',

            categoryField: 'Location',



  2. Iliana Nikolova
    Iliana Nikolova avatar
    2595 posts

    Posted 01 Jul Link to this post

    Hi Moses,

    If I understand correctly you would like to group the data by Location and display the status count? Following the approach from this how-to should help to achieve this. For your convenience here is a dojo - please check it and let me know if I am missing something.

    Iliana Nikolova
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
  3. Kendo UI is VS 2017 Ready
Back to Top