Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Dynamically add grouped Series in Charts

$
0
0

var dataSource = new kendo.data.DataSource({

    transport: {

        read: {

            url: "/GetData",

            dataType: "json"

        }

    },

    group: {

        field: "Name",

        dir: "asc"

    }

});

dataSource.read();

var view = dataSource.view();

 Using Fiddler, I can see that the call to dataSource.read() is successfully getting the JSON. However, dataSource.view() always returns an empty array. I'm not sure why this is the case.

 The JSON I'm returning looks like this:

 

[

     {
      "Name": "Bob",
      "Count": 2762,
      "Date": "2011-11-14 09:00"
    },
    {
      "Name": "Sue",
      "Count": 521,
      "Date": "2011-11-14 09:00"
    },
    {
      "Name": "Bob",
      "Count": 2769,
      "Date": "2011-11-15 09:00"
    },
    {
      "Name": "Sue",
      "Count": 525,
      "Date": "2011-11-14 09:00"
    }

]


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>