View Full Version : Did you know you could draw diagrams with JavaScripts?

07-10-2004, 04:56 PM
I was going to the Documentation thread of this section, and i saw a link that lead me to a rather interesting site. Here's the link:

At any rate, i did not know you could do diagrams with JavaScript. Imagine that.

Here's an example of the methods that can be used:

<script language="">


var D = new Diagram();

D.setFrame( 80, 160, 420, 360 );
D.setBorder( 10, 50, 0, 4 );
D.setText( "X-Lavel" , "Y-Label" , "Title" );
D.setGridColor( "#44cc44" );
D.Draw( "#80ff80" , "#0000ff" , true, "Click On Me!" , "DiagramClick()" );


function DiagramClick() {
alert( "Use your own function here!" );

Pretty little fish, isn't she?

07-10-2004, 10:36 PM
all it is that someone has written a script to provide a platform for them to easily make charts.


07-12-2004, 09:36 AM
i believe there's an ancient script on DevEdge (http://devedge.netscape.net/) for creating diagrams using JS.

however, you could use JS to invoke SVG commands, and create diagrams, such as pie charts like that.