Date: 06/08/06 (Javascript Community) Keywords: java
I've been working on a graphing (as in nodes) package in javascript (with ruby on rails plugins)... It uses a for decorations and for drawing lines; here's a link to a first prototype/proof of concept. I need to add in the links to excanvas so it will work with explorer, that will probably happen later today, but you can still look at the picture if you want ;-)Believe it or not, all of those nodes are created with lists and placed on top of the canvas. Yup. With absolute positions for the and a recursive algorithm to calculate the layout. The borders of the nodes and the lines connecting them are drawn on the canvas. I could, if I so desired, draw the nodes as ellipses (which are not normally supported by , but I've written some extensions to the CanvasRenderingContext2D class to support ellipses). I don't have the code written to draw the lines between the nodes for ellipses yet..... for a future day.My (ugly) prototype code can be found at tarpaulin.rubyforge.org.I hope to have it properly in a nice javascript class tonight, with the ability to render the graphs from Left to Right, Top to Bottom, Right to Left, or Bottom to Top.And this should be packaged as a Ruby on Rails gem tonight.
CanvasRenderingContext2D
Source: http://community.livejournal.com/javascript/101883.html