I am attempting to use the Kendo UI Angular directives to bind a DataViz pie chart locally, but I am encountering an error that says:
TypeError: Cannot call method 'toLowerCase' of undefined
at h (http://localhost:51717/Scripts/kendo/kendo.dataviz.min.js:11:5351)
at Object.o.aggregate (http://localhost:51717/Scripts/kendo/kendo.dataviz.min.js:11:20999)
at g (http://localhost:51717/Scripts/kendo/kendo.dataviz.min.js:11:5624)
at ct.extend._process (http://localhost:51717/Scripts/kendo/kendo.dataviz.min.js:11:31624)
at ct.extend.success (http://localhost:51717/Scripts/kendo/kendo.dataviz.min.js:11:28852)
at Object.proxy [as success] (http://localhost:51717/Scripts/jquery-1.10.2.js:841:14)
at ct.extend.read (http://localhost:51717/Scripts/kendo/kendo.web.min.js:11:21673)
at http://localhost:51717/Scripts/kendo/kendo.dataviz.min.js:11:28381
at ct.extend._queueRequest (http://localhost:51717/Scripts/kendo/kendo.dataviz.min.js:11:30001)
at ct.extend.read (http://localhost:51717/Scripts/kendo/kendo.dataviz.min.js:11:28266)
HTML
<div kendo-chart k-options="pie" k-data-source="countries" />
Angular
$scope.countries = {
data: [
{
category: "Asia",
value: 53.8,
color: "#9de219"
}, {
category: "Europe",
value: 16.1,
color: "#90cc38"
}, {
category: "Latin America",
value: 11.3,
color: "#068c35"
}, {
category: "Africa",
value: 9.6,
color: "#006634"
}, {
category: "Middle East",
value: 5.2,
color: "#004d38"
}, {
category: "North America",
value: 3.6,
color: "#033939"
}
]
};
$scope.pie = {
title: {
position: "bottom",
text: "Share of Internet Population Growth, 2007 - 2012"
},
legend: {
visible: false
},
chartArea: {
background: ""
},
seriesDefaults: {
labels: {
visible: true,
background: "transparent",
template: "#= category #: #= value#%"
}
},
series: [{
type: "pie",
field: "value",
categoryField: "category"
}],
tooltip: {
visible: true,
format: "{0}%"
}
};