Topic awaiting preservation: "Draw"-object in Javascript? (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Belgium |
posted 12-16-2002 10:17
Does anyone know if there is some kind of "draw" object in javascript. I would like to draw a line graph depending on a datasource. I know there are several ways to generate bar graphs, but I want line graphs. I don't know but it would be nice if such an object exists so I can draw lines, squares, circles and points in all kind of colors. If this isn't possible in javascript, any good alternatives? |
Maniac (V) Inmate From: Brisbane, Australia |
posted 12-16-2002 10:38
You can't actually "draw" with Javascript.... |
Maniac (V) Mad Scientist From: New California |
posted 12-16-2002 18:58
I am not aware of anyone who has done this in Javascript. The circles would be pretty hard to do but the 90 degree stuff is just possible. One could use divs with appropriate background colors to create boxes and lines. It's a actually a tempting challenge. It might be fun to start writing a basic set of box drawing objects and see where it takes us. Anybody else see potential with this one? |
Paranoid (IV) Inmate From: France |
posted 12-16-2002 19:14
The box are piece of cake. |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 12-16-2002 19:20
The poster has demanded we remove all his contributions, less he takes legal action. |
Bipolar (III) Inmate From: |
posted 12-16-2002 23:26
shameless begging for help |
Paranoid (IV) Inmate From: Dublin, Ireland |
posted 12-17-2002 21:42 |
Bipolar (III) Inmate From: övik |
posted 12-18-2002 03:14
It's easy to draw using javascript, http://www.naltabyte.se/space/vectors |
Bipolar (III) Inmate From: övik |
posted 12-18-2002 03:16
Oh, and you can add some stuff to this page while you're at it. http://www.naltabyte.se/art |
Maniac (V) Inmate From: Brisbane, Australia |
posted 12-19-2002 00:19
Ooh... nifty. |
Maniac (V) Mad Scientist From: Jacks raging bile duct.... |
posted 12-24-2002 17:51
I was thinking about this myself the other day and was wondering when someone will design a "box" model that will allow bezier curve coordinates to modify the box sides (e.g. like to create an octagon or to make your text follow the outline of an image )...I can think of a slew of great web design things I could do with something like that... |
Obsessive-Compulsive (I) Inmate From: England |
posted 12-30-2002 22:06
Hey Guys, |
Paranoid (IV) Inmate From: Milwaukee |
posted 12-30-2002 22:50
What you're talking about, Boudga, is runarounds, and although they've existed for ages in publishing programs, I can't imagine them making an appearance on the web for a while yet. Sure would be nice, though, huh? |
Nervous Wreck (II) Inmate From: Leiden, the Netherlands |
posted 01-16-2003 21:36
I'm working on this API that uses DHTML to draw lines. No plug ins needed, only modern browsers :P. Probably only works in IE so far. I made functions for circles as well and am working on 3d cubes. Work in progress can be found here. |
Maniac (V) Mad Scientist From: New California |
posted 01-16-2003 23:13
I took a peek at your code and it's an interesting approach. You are drawing the circles one div at a time using the innerHTML method. That seems to render a large number of divs on one page much faster compared to using the createElement method. |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 01-16-2003 23:39
The poster has demanded we remove all his contributions, less he takes legal action. |
Nervous Wreck (II) Inmate From: Leiden, the Netherlands |
posted 01-17-2003 17:03
Bugimus: I never use the createElement() method because it takes too much work and lines of code. Altho the innerHTML thing works faster, it still works really slow, when more shapes are drawn, because every pixel takes a lot of code (e.g. <div style=blabla></div> for only 1 pixel). Does anyone have an idea of making this work faster? |
Obsessive-Compulsive (I) Inmate From: Germany |
posted 02-21-2003 20:11
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 02-22-2003 12:27
The poster has demanded we remove all his contributions, less he takes legal action. |
Nervous Wreck (II) Inmate From: Leiden, the Netherlands |
posted 03-03-2003 16:49
Wow, that one is really good! It covers pixel optimization and filled ovals! I'm gonna hack the code for that and see what I can learn from it. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 03-03-2003 17:59
Hey, that's really nice. I wouldn't recommend using JavaScript for such things, but in the rare cases that it's necessary, that looks like a good library to use. |