Squarified Treemap in which the nodes do not change their position

41 views
Skip to first unread message

Linda

unread,
May 12, 2013, 6:34:02 AM5/12/13
to javascript-information...@googlegroups.com
Hi,

I'm working with the JIT Toolkit (which is really fantastic by the way) now for some time and i've ve created a Squarified Treemap.
In my Treemap, the user can change the weight of a node (in the JSONfile) by entering a value into a textbox and then clicking on a node which will then expand (if the value is positiv /else compress). That works fine, but my problem is when i change the weight of a node, the node itself and sometimes other nodes too, change their position in the Treemap. Is there any way to prevent this in a Squarified Treemap (perhaps similar to the SliceAndDice Treemap, where the nodes don't change their position by changing a weight)?
 
This is how i change the weight of a node in Level 2, for example:

    //read value from a textbox and overwrite the weight of the node in the JSONfile with the new value
    JSONfile.children[c].data.$area = parseInt('<the value of the Textbox entered by a user>');

    //reload Treemap with new values from the JSONfile
    tm.loadJSON(JSONfile);
    tm.refresh();

I'm trying to solve this problem now for quiet a while with no success. Therefore i would be grateful for any help.

Thanks,
Linda
Reply all
Reply to author
Forward
0 new messages