1

I want to draw a dynamic graph with standard HTML/Javascript/JQuery (not HTML5).

The nodes are divs with certain contents, and between them I need lines. At least horizontal and vertical. It's possible to add and remove nodes dynamically.

It would be nice if the divs are draggable too, but is not necessary.

Can this be done with standard HTML, maybe with help of some JQuery library?

I only find negative answers on this, like: http://www.coderanch.com/t/518805/open-source/do-generate-dynamic-graph-html

Thanks in advance.

P.D. Seems to be a typic use case for Flash. I can't use HTML5 because it has to run everywhere. And I don't see a reason to use something like SVG instead of Flash.

3
  • You may create 1x1 divs and build graph from them. But it is hardly efficient. Commented Apr 12, 2012 at 22:53
  • @David I don't see in Google charts what I'm looking for (graph with edges / nodes). But I see it uses SVG. Would that be recommended? Or maybe Flash is better? About "What have you tried" - not that kind of question. I think is evident I hadnt tried anything and I'm looking how to start. Commented Apr 12, 2012 at 22:57
  • How do you not use HTML5 and use jQuery? I expect it will use HTML5 features if they are available and fall back to older features if they aren't, as would any library. Commented Apr 12, 2012 at 23:10

3 Answers 3

2

This would probably be easy to make with JointJS. It uses Raphael for handling the graphics, which is based on SVG but also support VML for IE. JointJS claims to support the following browsers: Firefox 3.0+, Safari 3.0+, Opera 9.5+, Google Chrome 4+ and Internet Explorer 6.0+.

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

1 Comment

That looks exactly like what I need. But is there any advantage of using this (SVG + VML) over Flash? (besides of the fact that this is a ready to use library)
1

JQplot is great: http://www.jqplot.com/

It has a very "Google analytics" feel to it right out of the box.

It's built on jQuery which works great for what you've described.

1 Comment

Looks like a HTML5 canvas solution with fallback on VML or SVG. And it doesn't support exactly what I need - elements with certain content linked with lines. It's more for charts, statistics and so on.
0

You can use Google Charts, Google Graph API Examples.

Comments

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.