I am getting this error message in console when using kendoChart :
Uncaught TypeError: e.slice is not a function
Here is my relevant JavaScript code:
var stats = {
occupation_sejour_long: [{
value: 10,
date: new Date("03/21/2016")
}, {
value: 20,
date: new Date("03/28/2016")
}, {
value: 30,
date: new Date("04/04/2016")
}],
occupation_sejour_court: [{
value: 54,
date: new Date("03/19/2016")
}, {
value: 63,
date: new Date("03/25/2016")
}, {
value: 49,
date: new Date("04/14/2016")
}]
}
$("#chartOccupation").kendoChart({
theme: "bootstrap",
dataSource: {
data: stats
},
title: {
text: "Répartition Occupation / Type séjour ",
position: "bottom",
},
legend: {
visible: true,
position: "bottom",
},
series: [{
name: 'Séjour long',
type: 'line',
color: "blue",
field: 'value',
categoryField: 'date',
data: stats.occupation_sejour_long
},
{
name: 'Séjour court',
type: 'line',
color: "red",
field: 'value',
categoryField: 'date',
data: stats.occupation_sejour_court
}
],
valueAxis: {
min: 0,
max: 100,
majorUnit: 10,
line: {
visible: false,
},
labels: {
format: "{0}%"
},
},
categoryAxis: {
labels: {
dateFormats: {
days: "dd/MM"
}
},
baseUnitStep: 1,
type: "date",
justified: true,
baseUnit: "days",
rangeLabels: {
dateFormats: {
days: "dd/MM/yy"
},
visible: true
},
},
tooltip: {
visible: true,
template: "#= kendo.toString(dataItem.date, 'dd/MM/yyyy') # - #= dataItem.value #%",
}
});
Although the chart output is displayed as expected, the error seems to affect some other parts of my code. For instance, This simple script doesn't work for me:
$("#dateDebut").change(function(e) {
console.log("Testing....")
});
Any explanations for that? What is wrong in my code and how should I fix it? Any idea?