1

I want to be able to display dynamic syntax trees on a webpage, possibly with a jQuery component. To show you what I mean, this

Syntax tree

is a syntax tree, and this is the general way I want it to be displayed.

How do I build something like this with HTML and CSS?

edit: Solution

Just in case somebody who finds this question later is trying the same, here's what I did:

I ended up drawing the tree with Graphviz as an SVG, and then, moving the svg tree inside the DOM using some magic. That way I could still interact with the elements, e.g. drag&drop or hover/click events.

The result can be seen here.

2
  • and wat is the question? Commented Jun 27, 2013 at 12:21
  • How do I build something like this with HTML and CSS? Commented Jun 27, 2013 at 12:24

2 Answers 2

1

Try d3, it has a really good tree visualization

Sign up to request clarification or add additional context in comments.

Comments

1

Another option is ArborJs, you can find an introduction here

1 Comment

I'm not sure, it seems to do too much by itself. One of the requirements for my scenario is that the root node is always on top, daughter nodes are on the next level and so on.. But I'll look into it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.