I've copied and pasted the onSeriesClick function and it doesn't seem to be working for some reason,
<script type="text/javascript">
function createChart() {
$("#chart").kendoChart({
theme: $(document).data("kendoSkin") || "default",
title: {
text: "Project Management"
},
legend: {
position: "bottom"
},
seriesDefaults: {
labels: {
template: "#= kendo.format('{0:P}', percentage)#",
visible: true
}
},
series: [{
type: "pie",
data: [{
category: "Quality",
value: 80
}, {
category: "Time",
value: 80
}, {
category: "Cost",
value: 80
}]
}],
tooltip: {
visible: true,
template: "#= kendo.format('{0:P}', percentage)#"
}
});
}
$(document).ready(function () {
setTimeout(function () {
// Initialize the chart with a delay to make sure
// the initial animation is visible
createChart();
$("#example").bind("kendo:skinChange", function (e) {
createChart();
});
}, 400);
$(".configuration").bind("change", refresh);
});
function refresh() {
var chart = $("#chart").data("kendoChart"),
pieSeries = chart.options.series[0],
labels = $("#labels").prop("checked"),
alignInputs = $("input[name='alignType']"),
alignLabels = alignInputs.filter(":checked").val();
chart.options.transitions = false;
pieSeries.labels.visible = labels;
pieSeries.labels.align = alignLabels;
alignInputs.attr("disabled", !labels);
chart.refresh();
}
function onSeriesClick(e) {
alert("Clicked value: " + e.value);
}
</script>
<script type="text/javascript">
function createChart() {
$("#chart").kendoChart({
theme: $(document).data("kendoSkin") || "default",
title: {
text: "Project Management"
},
legend: {
position: "bottom"
},
seriesDefaults: {
labels: {
template: "#= kendo.format('{0:P}', percentage)#",
visible: true
}
},
series: [{
type: "pie",
data: [{
category: "Quality",
value: 80
}, {
category: "Time",
value: 80
}, {
category: "Cost",
value: 80
}]
}],
tooltip: {
visible: true,
template: "#= kendo.format('{0:P}', percentage)#"
}
});
}
$(document).ready(function () {
setTimeout(function () {
// Initialize the chart with a delay to make sure
// the initial animation is visible
createChart();
$("#example").bind("kendo:skinChange", function (e) {
createChart();
});
}, 400);
$(".configuration").bind("change", refresh);
});
function refresh() {
var chart = $("#chart").data("kendoChart"),
pieSeries = chart.options.series[0],
labels = $("#labels").prop("checked"),
alignInputs = $("input[name='alignType']"),
alignLabels = alignInputs.filter(":checked").val();
chart.options.transitions = false;
pieSeries.labels.visible = labels;
pieSeries.labels.align = alignLabels;
alignInputs.attr("disabled", !labels);
chart.refresh();
}
function onSeriesClick(e) {
alert("Clicked value: " + e.value);
}
</script>