![]() Topic awaiting preservation: "Draw"-object in Javascript? (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Belgium |
![]() 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 |
![]() You can't actually "draw" with Javascript.... |
Maniac (V) Mad Scientist From: New California |
![]() 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 |
![]() The box are piece of cake. |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
![]() The poster has demanded we remove all his contributions, less he takes legal action. |
Bipolar (III) Inmate From: |
![]() shameless begging for help |
Paranoid (IV) Inmate From: Dublin, Ireland |
![]() |
Bipolar (III) Inmate From: övik |
![]() It's easy to draw using javascript, http://www.naltabyte.se/space/vectors |
Bipolar (III) Inmate From: övik |
![]() 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 |
![]() Ooh... nifty. |
Maniac (V) Mad Scientist From: Jacks raging bile duct.... |
![]() 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 |
![]() Hey Guys, |
Paranoid (IV) Inmate From: Milwaukee |
![]() 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 |
![]() 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 |
![]() 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 |
![]() The poster has demanded we remove all his contributions, less he takes legal action. |
Nervous Wreck (II) Inmate From: Leiden, the Netherlands |
![]() 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 |
![]() http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
![]() The poster has demanded we remove all his contributions, less he takes legal action. |
Nervous Wreck (II) Inmate From: Leiden, the Netherlands |
![]() 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 |
![]() 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. |