In the attached program, when you load “Survey Local” the charts on the left and right looks the same and this is how they should look.
The problem is once you click on any “yes” or “no” button I programmatically update the chart by following codes near line 719
var chart = $("#PieChart1").data("kendoChart");
chart.options.series[0].data = series;
chart.refresh();
The chart did update but the layout changed too which should not happen and I had no idea why.
Please Help.
Thanks
Edwin
(YearSalesTarget ge 1000 and State eq 'nv')I seem to be getting a memory leak on the grid widget. I pasted my code is below. In Firefox 12, when the application first runs up, Windows Task Manager says it is taking up around 60Mb of memory. If you click the add button, the memory used grows to around 85Mb, When you click the remove button, the memory does reduce a bit (after about 30 secs), but it only reduces to around 80Mb.
Is there leak in my code or kendo grid widget?
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<script src="Scripts/jquery.min.js"></script>
<script src="Scripts/kendo.web.min.js"></script>
<link href="Styles/kendo.common.min.css" rel="stylesheet" />
<link href="Styles/kendo.metro.min.css" rel="stylesheet" />
</head>
<body>
<div>
<button id="add" value="add">add</button>
<button id="remove" value="remove">remove</button>
<div id="grid"></div>
</div>
<script>
$(document).ready(function () {
$("#add").click(function () {
var data = [],
sharableDataSource,
i;
for (i = 0; i < 5000; i = i + 1) {
data.push({ field: "value " + i
});
}
sharableDataSource = new kendo.data.DataSource({ data: data });
$("#grid").kendoGrid({
groupable: false,
scrollable: true,
sortable: true,
pageable: false,
resizable: true,
selectable: "row",
dataSource: sharableDataSource,
columns: [{ field: "field", title: "field" }]
}).data("kendoGrid");
data = null;
sharableDataSource = null;
});
$("#remove").click(function () {
$("#grid").empty();
});
});
</script>
</body>
</html>