javascript - Hyperbolic / Radial Tree Layout Algorithm -
i need obtain (x,y) coordinates rendering tree data structure made of single nodes. know there algorithms example:
my tree looks this:
treenode=function(data,parent){ this.data=data; this.parent=parent; this.children=[]; return this; }; treenode.prototype.addchild=function(data){ this.children.push(new treenode(data,this)); return this; }; how ever, cant seem figure out how implement these algorithms or library me.
i using html canvas draw nodes javascrypt. need position of each node acoording 1 of stated before algorithms.
how can implement algorithm? there library can use?
Comments
Post a Comment