admin管理员组文章数量:1356950
I'm new in the world of JavaScript and I haven’t found a good framework to draw diagrams in JavaScript. This is for a school project, so I have little time to develop, but I’m willing to learn a lot hehehe. Basically what I want to do is make a simple workflow web editor; (you can see my mockup below) and I want to make something like this /, obviously, not so plex.
I'm using primefaces for the overall interface, but I have no idea how draw things in a canvas, I thought JQuery will do, even Mootools, but I'm just not sure, do you know any good JavaScript framework to draw diagrams (basic figures and connectors will do)?
I have done a little research, and found this: ui.ajax/#demos/elements.flowchart, do you think I can get it to work with JSF?
I'm new in the world of JavaScript and I haven’t found a good framework to draw diagrams in JavaScript. This is for a school project, so I have little time to develop, but I’m willing to learn a lot hehehe. Basically what I want to do is make a simple workflow web editor; (you can see my mockup below) and I want to make something like this http://www.diagram.ly/, obviously, not so plex.
I'm using primefaces for the overall interface, but I have no idea how draw things in a canvas, I thought JQuery will do, even Mootools, but I'm just not sure, do you know any good JavaScript framework to draw diagrams (basic figures and connectors will do)?
I have done a little research, and found this: ui.ajax/#demos/elements.flowchart, do you think I can get it to work with JSF?
Share Improve this question edited Jun 23, 2011 at 17:33 user142162 asked Jun 23, 2011 at 17:29 Tomas O'ConnorTomas O'Connor 251 silver badge5 bronze badges 2- The link to your diagram is not plete – nikhil Commented Jun 23, 2011 at 17:49
-
Did you try to integrate
ui.ajax/#demos/elements.flowchart
with JSF? – Dosty Commented Dec 20, 2011 at 15:30
5 Answers
Reset to default 4I would remend taking a look at Raphael
I haven't used it a whole lot, but it looks pretty capable and the documentation isn't bad. It is pretty easy to attach event handlers to the drawn objects, which sounds like something you will need to do a lot of.
You might want to read about the HTML5 canvass, it has some cool features that you can exploit to draw stuff.
The Flowchart.js library can help make some basic flow chart diagrams.
This first snippet will define the six items in the flowchart, including the starting and ending circles.
st=>start: Start:>http://www.google.[blank]
e=>end:>http://www.google.
op1=>operation: My Operation
sub1=>subroutine: My Subroutine
cond=>condition: Yes
or No?:>http://www.google.
io=>inputoutput: catch something...
This second snippet defines the connections between items.
st->op1->cond
cond(yes)->io->e
cond(no)->sub1(right)->op1
You might want to look at processing.js: http://processingjs/
use graphiti which provides exact what you want
本文标签: ajaxHow can I use javascript to draw diagramsStack Overflow
版权声明:本文标题:ajax - How can I use javascript to draw diagrams? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743994573a2572751.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论