BarChart can´t use odata remote DataSource ?!

1 posts, 0 answers
  1. dravus peter
    dravus peter avatar
    3 posts
    Member since:
    Oct 2009

    Posted 11 Jul 2012 Link to this post

    I Like to use a Chart in my website...
    and use this chart with datasource to my "wcf data service".


    // DataSource
    //#########################
     
     $(document).ready(function () {
     
     
            var remoteDataSource = new kendo.data.DataSource({
                type: "odata",
                transport: {
                    read: "http://localhost:1674/WcfDataService1.svc/Stats"
                }
            });
     
            remoteDataSource.read();
     
     
     
    // Chart
    //#########################
                       
    $("#chart").kendoChart({
                title: {
                    text: "Kendo Chart Example"
                },
                dataSource: {
                    data: remoteDataSource
                },
                series: [{
                    name: "Customers",
                    field: "Customers"
                }],
                categoryAxis: {
                    field: "Datum"
                }
            });
     
        });



    The Dataservice and the Datasource works but my chart throw each times an error:
    "Uncaught TypeError: Object [object Object] has no method 'slice'" but why??

    If i use the same datasource with a gridview it works very fine :(
Back to Top