最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

jquery - HTMLJavascript: how to draw a dynamic graph - Stack Overflow

programmeradmin5浏览0评论

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:

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.

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./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.

Share Improve this question edited Apr 12, 2012 at 23:02 ixx asked Apr 12, 2012 at 22:45 ixxixx 32.3k41 gold badges137 silver badges237 bronze badges 3
  • You may create 1x1 divs and build graph from them. But it is hardly efficient. – kirilloid 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 remended? 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. – ixx 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. – RobG Commented Apr 12, 2012 at 23:10
Add a ment  | 

3 Answers 3

Reset to default 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+.

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

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.

You can use Google Charts, Google Graph API Examples.

发布评论

评论列表(0)

  1. 暂无评论