HyperTree drawing algorithm

37 views
Skip to first unread message

Damion Dooley

unread,
Nov 18, 2009, 1:49:41 AM11/18/09
to javascript-information...@googlegroups.com
I guess this is a bump from a previous question a month ago.  I've played around with the API and had some fun.  But I discovered that when a hypertree is drawn, the shallowest edges are drawn first, then edges of depth 2, then depth 3 etc.  Is / can there be an option to reverse this so that edges of greatest depth are drawn first, then more shallow ones, leaving shallowest till last?  This way coloring and thickness features can be added. 
 
 
Central edges and adjacencies are obscured according to current algorithm.
 
Thanks for advice, anyone!
 
Damion
 

Damion Dooley  ·   LearningPoint.ca  Website Technology   ·   604 877 0304

Nico Garcia Belmonte

unread,
Nov 19, 2009, 1:09:31 PM11/19/09
to javascript-information...@googlegroups.com
Hi

Thanks for your suggestion. Currently there isn't a built-in way to specify this, and I think this could be a little bit complex to implement right now, since I don't have much time.

If yo still want to explore new ways for plotting the graph you'll find the plot method at line 3194 of jit.js. For each node the algorithms goes through all its connections first, sort of like a BFS traversal.

Perhaps changing the order of the nodes to plot can be useful for doing what you're trying to do.

If you want to know more about the graph traversal methods the toolkit has you can take a look at the Graph.Util object:

http://thejit.org/docs/files/Graph-js.html#Graph.Util

Regards,

--

You received this message because you are subscribed to the Google Groups "JavaScript Information Visualization Toolkit" group.
To post to this group, send email to javascript-information...@googlegroups.com.
To unsubscribe from this group, send email to javascript-information-visua...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-information-visualization-toolkit?hl=.



--
I would never die for my beliefs because I might be wrong.

Bertrand Russell
Reply all
Reply to author
Forward
0 new messages