after upgrading to "2016.1.118" my code (see below) produce an "Uncaught TypeError: Cannot read property 'date' of undefined" when trying to access dataItem properties in chart.series.notes.label.template:
The code:
var
devChart = $(
"#chart"
).kendoStockChart({
theme:
"bootstrap"
,
dataSource: chartDs,
dateField:
"date"
,
series: [{
type:
"line"
,
style:
"smooth"
,
field:
"pct"
,
noteTextField:
"date"
,
// keep, however overruled by label.template
notes: {
position:
"bottom"
,
icon: {
visible:
false
},
label: {
color:
"white"
,
border: {
dashType:
"dash"
},
background:
"#777"
,
rotation: -90,
position:
"inside"
,
template:
"#:kendo.toString(category, 'dd-MMM-yyyy')#"
// this code works in "2016.1.118" version
//template: "#:kendo.toString(dataItem.date, 'dd-MMM-yyyy')#" // this code worked in pre-"2016.1.118" version
}
}
}],
...
My dataset:
[{"rId":6789,"date":"2015-05-06T12:28:33.643+02:00","max":160.00,"score":140.0,"pct":88.0,"survey":"survey 1"},{"rId":7228,"date":"2015-05-29T11:14:42.047+02:00","max":160.00,"score":150.0,"pct":94.0,"survey":"survey 1"},{"rId":9590,"date":"2015-08-11T13:53:27+02:00","max":160.00,"score":160.0,"pct":100.0,"survey":"survey 1"},{"rId":12770,"date":"2015-10-02T10:53:55+02:00","max":160.00,"score":140.0,"pct":88.0,"survey":"survey 1"},{"rId":14890,"date":"2015-10-28T12:41:27+01:00","max":160.00,"score":140.0,"pct":88.0,"survey":"survey 1"},{"rId":16222,"date":"2015-11-06T13:12:12+01:00","max":365.00,"score":365.0,"pct":100.0,"survey":"survey 2"}]