News for hackers. Stuff that matters.
Re:Introduction to Raphaël JS by brechin on Friday March 01, 2013 @03:01PM (#5306611)
I learned about RaphaelJS recently and used it (along with some jQuery code) to make a very interactive county-by-county map of data our company is interested in displaying for marketing purposes.

I've heard about D3 (http://d3js.org/), but haven't had a chance to use it in my work yet. Can anyone offer comparisons with its SVG rendering performance & capabilities?

Re:Introduction to Raphaël JS by oscilloscope on Friday March 01, 2013 @03:41PM (#5306830)
D3 just exposes SVG directly to you. But with county maps specifically, you can compress and simplify the data with TopoJSON and use d3.geo to render it. d3.geo even has a canvas renderer and many projections to choose from. And since it's d3, you can do data-driven transitions between different datasets and projections.

I bet you haven't seen anything like this in Raphael.

http://www.jasondavies.com/maps/transition/

Re:Introduction to Raphaël JS by brechin on Friday March 01, 2013 @03:54PM (#5306887)
The transitions are what really interest me about D3. It seems much better suited for that use-case. Thanks for the interesting link!
Re:Introduction to Raphaël JS by erikdared on Friday March 01, 2013 @03:57PM (#5306896)
I used Raphael in the past and am just starting to learn D3 now. D3 seems to make it a lot easier to take a data set and represent it visually. It has lots of very useful helpers for scaling axes and such (even when the units are time). I know I've only really scratched the surface so far, but those are things that stand out the most.

Raphael is still very capable, but it took me a lot more effort to create a graph than with D3. I think Raphael is better at general purpose drawing.

Bottom line: D3 is best if you're taking data and want to represent it visually in a chart/graph. Raphael can do general-purpose drawing without explicitly needing any data to back it.

Re:Introduction to Raphaël JS by mlent on Friday March 01, 2013 @05:36PM (#5307409)
I have had the same experience. You have to DIY a lot if you want to create a graph or chart with Raphael, whereas D3 will just take your data and make one for you.