3 ms·
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 i
by brechin 14y ago
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/ 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?
- oscilloscope 14y agoD3 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/ http://www.jasondavies.com/maps/transition/
- brechin 14y agoThe transitions are what really interest me about D3. It seems much better suited for that use-case. Thanks for the interesting link!
- erikdared 14y agoI 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.
- mlent 14y agoI 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.