Hacker News new | ask | show | jobs
by schreiaj 3486 days ago
For basic charting I'd have to agree with you. D3 has some awesome utility functions (scales, SVG path generation, the entire geo side of things... ) but their method of binding to the DOM was always hard for folks to wrap their mind around. So replacing the confusing part with React/JSX has made a lot of visualization code MUCH cleaner.

Doing animations gets a little harder and I still haven't found a really nice way to do it. If anyone has any good suggestions I'm looking. I've done some stuff with React Motion but it was much harder than the equivalent d3.transition call.

3 comments

Your comment perfectly matches my own experience. Animating charts is hard, however, data-binding is much simpler with JSX.

http://cx.codaxy.com/v/master/docs/charts/legend

For me, the problem with D3 is how low level it is. It gives you the underlying structure and calculations to do visualization, and that means you can do incredible things with it, but it's a long process. I felt like I was building things from first principles.
I've always thought about D3 as 'jQuery for SVG'.
There are solutions like NVD3,c3js, rickshaw that are higher level than d3js.
This. I've been telling people that as soon as animations get improved in React, I'm switching the drawing layer over to React!