This is a migrated thread and some comments may be shown as answers.

BarChart can´t use odata remote DataSource ?!

0 Answers 78 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
dravus peter
Top achievements
Rank 1
dravus peter asked on 11 Jul 2012, 02:29 PM
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 :(

No answers yet. Maybe you can help?

Tags
Drag and Drop
Asked by
dravus peter
Top achievements
Rank 1
Share this question
or