I'm looking into checking the data source after it is bound to see how many items there are. For some reason I can't get the dataBound or dataBinding events to even fire.
The data is actually being passed into a function so when the grid is created it has the data locally.
Example: http://dojo.telerik.com/IjAKo/2
Source Code:
<div id="grid"></div>
<script>
function onDataBinding(e) {
console.log('here');
}
$(document).ready(function() {
var chart = $("#grid").kendoChart({
chartArea: {
height: 250,
},
legend: {
position: "bottom",
labels: {
font: "bold 10px Arial",
}
},
seriesDefaults: {
type: "column",
spacing: 0,
overlay: {
gradient: "none"
}
},
series: [{
name: "ESCROW",
color: "#cccbcb",
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
}, {
name: "NON-ESCROW",
color: "#406f8c",
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
}],
categoryAxis: {
line: {
visible: false
},
categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Set", "Oct", "Nov", "Dec"],
majorGridLines: {
visible: false
}
},
valueAxis: {
labels: {
format: "{0:N0}"
},
line: {
visible: false
},
majorGridLines: {
visible: false
},
max: 20
},
tooltip: {
visible: true,
format: "{0:N0}"
},
dataBinding: onDataBinding // tried to do it here.
});
// tried to bind after initialization
chart.bind("dataBound", function(e) {
alert('here')
});
});
</script>