Hi There,
I am new to kendo UI, I am struggling to bind dynamic data to treemap. I could not able to find example on forum
Controller returns:
Json(treeMap, JsonRequestBehavior.AllowGet); object of following class
public class TreeMapData
{
public int ParameterID{...}
public string ParameterName{...}
public double ParameterWeight{...}
//public string ParameterStatus
public List<TreeMapData> ParameterChilds{..}
//public string ParameterTooltip{...}
public bool HasChild { get { return ParameterChilds.Count > 0?true:false; }
}
View:
<script type="text/javascript">
function createTreeMap() {
$("#treeMap").kendoTreeMap({
dataSource: {
transport: {
read: {
url: '@Html.Raw(Url.Action("GetAnalysisData", "Analysis", ""))',
dataType: "json"
}
},
schema: {
model: {
parameterid: "ParameterID",
parametername: "ParameterName",
parameterwieght: "ParameterWeight",
hasChildren: "HasChild",
children: "ParameterChilds"
}
}
},
textField: "parametername",
valueField: "parameterwieght"
});
}
$(document).ready(function () {
createTreeMap();
$(document).bind("kendo:skinChange", createTreeMap);
});
</script>
Error : Microsoft JScript runtime error: Object doesn't support property or method 'slice'.
When i bind status data, it perfectly works fine.