Live data from Hacker News

Here's why Raphael.js and SVG totally rock.

trottercashion.com

51–56 of 56 posts

Re: Here's why Raphael.js and SVG totally rock.

#51
post #2

There's also gRaphael specifically for charting: http://g.raphaeljs.com/ Also, the article mentions that IE doesn't support the tag. While this is true, you only need to add the excanvas JS library to use in IE.

Sorry to be pimping my own stuff, but for the moment I think Grafico is more mature/offers better charts than gRaphael: http://grafico.kilianvalkhof.com/ Worth taking a look regardless :)

Re: Here's why Raphael.js and SVG totally rock.

#52
post #4

I have found myself using jQuery SVG more. This link shows what other people think of the two: http://stackoverflow.com/questions/588718/jquery-svg-vs-raphael The version of Raphael I used at one point had to be in complete control from object 1 and could not import SVGs. So let's say I generate an SVG via graphviz and then want to make some of the nodes interactive (or at least animate). I get a good amount of tween…

I'm in enthusiastic agreement. I tried to use Raphael for a hobby project that required efficient scaling of a lot of elements, and I thought Raphael would be ideal for this. Unfortunately, Raphael's list-like data structure (I forget exactly what it's called) doesn't take advantage of SVG's natural advantages in this area. It loops over all the elements in the list and scales them individually, rather than putting them all in one node and scaling that. It's horribly slow for large groups.

edit: I should mention that I moved to jquery-svg and have been happy ever since. :)

Re: Here's why Raphael.js and SVG totally rock.

#53
post #29

Assuming you don't care about IE, what's the Pros/Cons for SVG vs Canvas? Canvas seems to be pretty nice from what I've used it for so far...

Canvas is significantly faster for animation: http://www.themaninblue.com/writing/perspective/2010/03/22/ It is also more likely to get faster in the future, as browsers might implement GPU acceleration for it. I wouldn't hold my breath waiting for GPU acceleration for SVG, since SVG is not as easily mapped to drawing primitives, like Canvas is.

There's already an implementation of hardware accelerated SVG, in IE9: http://blogs.msdn.com/ie/archive/2010/04/07/a-closer-look-at...

There's also a toggle in Firefox's about:config that turns on hardware acceleration on Windows.

Re: Here's why Raphael.js and SVG totally rock.

#55
post #33

Earlier quoted context omitted.

Accidentally voted you down - sorry (last time I try to do that mobile before zooming down). I did want to add though: does anyone know why this is, or if it's slated for a future (2.2?) release?

I've believe it's because SVG support is still listed as experimental in WebKit; there are 258 SVG bugs listed on WebKit's Bugzilla: https://bugs.webkit.org/buglist.cgi?product=WebKit&compo...

That definitely explains it. If I wasn't primarily a JS developer I'd probably delve in and help fix it :) Really want SVG support on my N1.

Re: Here's why Raphael.js and SVG totally rock.

#56
post #51
post #2

There's also gRaphael specifically for charting: http://g.raphaeljs.com/ Also, the article mentions that IE doesn't support the tag. While this is true, you only need to add the excanvas JS library to use in IE.

Sorry to be pimping my own stuff, but for the moment I think Grafico is more mature/offers better charts than gRaphael: http://grafico.kilianvalkhof.com/ Worth taking a look regardless :)

Thanks for posting. No you don't have to be sorry for pimping your own stuff. If you didn't, I probably never would have heard of Grafico.
Post reply on HN