Stefan
unread,May 25, 2012, 6:43:38 PM5/25/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to JavaScript InfoVis Toolkit
Hi,
I'm doing a project on visualizing in what order different search
algorithms traverse the nodes a tree. Since Spacetree is by far the
best (maybe even the only) library I could find for Javascript that
can draw trees, even with cool effects, I will be using this.
(complements on the library). However, after struggling for a long
time, I'm posting here for some basic questions about how to do
certain things.
I wrote a function that converts my own tree datastructure to JSON
format and I got it to load and display by the SpaceTree library. I
also managed to display all nodes without having parts of it collapsed
and i found out how to focus on a specific node. There are some things
I couldn't get to work though:
- The search algorithms visit the nodes in the tree in a certain
order. Whenever a node is visited I want to mark it by giving it, for
example, a red border, or any style for that matter. What is the
proper way to do this? I'm having a bit of difficulty to determine
which functions named in the manual do what exactly. I didn't manage
to figure it out by looking at the style morphing example. Could you
tell me which functions to use for this?
- Also is there a way to change the data in the nodes, after the JSON
tree has been loaded? I want to put some html in the data field, and
show that in the label, but I'm not sure how I can change this after
the tree has been loaded.
Hope anyone can help me out :)
Thanks in advance.