telerik - Kendo UI treemap json binding -


I am not trying to create a very simple Tremap (a hierarchy) using Datio UI, it's a datasource Providing some JSN data in It should be very straightforward and simple because it is a general use-case.

  & lt; Body & gt  

I tried this:

I tried to do it: ; & Lt; Div id = "treemap" & gt; & Lt; / Div & gt; & Lt; Script & gt; Var data = [{name: "foo123", value: 10}, {name: "foo234", value: 20}]; $ ("# Treemap"). Candomenim map ({Datasource data, whale field: "value", textfield: "name"}); & Lt; / Script & gt; & Lt; / Body & gt;

What am I missing?

As stated in "Trepap is a sequence of hierarchies":

Tremapping is a sequence of hierarchical data that uses a nested rectangle related to the size and color of each rectangle structure, so that you can easily identify trends and patterns

< / Blockquote>

Try adding a "root" level that wraps up your two elements:

  & Lt; Body & gt; & Lt; Div id = "treemap" & gt; & Lt; / Div & gt; & Lt; Script & gt; Var data = [{name: "foo", value: 1, item: [{name: "foo123", value: 10}, {name: "foo234", value: 20}]}]; $ ("# Treemap"). Candomenim map ({Datasource data, whale field: "value", textfield: "name"}); & Lt; / Script & gt; & Lt; / Body & gt;  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -