Hacker News new | past | comments | ask | show | jobs | submit login

Probably the most important innovation of d3 is the idea of the DOM - data join. Mike Bostock, handsome father of d3.js and maker of all that is pure and wonderful (I have the good fortune to spend lots of work time using d3), mentioned this himself during his reddit AMA, see https://www.reddit.com/r/dataisbeautiful/comments/3k3if4/hi_...

In short, you get some data, you join it with a selection of wholly or partially non-existent DOM, and then you work with the enter (new), update (existing) and exit (not required for the new data) selection. This is an extremely powerful metaphor for representing data and performing dynamic data updates using arbitrary mixes of SVG (or any other DOM) elements. (oh, based on this mechanism, you can build really beautiful visual transitions)

Here's a short introduction to the join idea in d3: https://bost.ocks.org/mike/join/

BTW, programming in d3.js already feels a whole lot like programming in a functional language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: