3 ms·
Thanks for the feedback! There were so many rabbit holes that I had to prevent myself going down - I scope creeped this article enough as it is! I also specifi
by wattenberger 7y ago
Thanks for the feedback! There were so many rabbit holes that I had to prevent myself going down - I scope creeped this article enough as it is!
I also specifically didn't want to go into the data join patterns for two main reasons:
1. there are lots of other articles that talk about it in depth, and
2. these days, I largely don't use it at all.
This is partially why I wanted to write this up, because the DOM manipulation parts can seem like an integral part of D3, but there are really only 2 modules devoted to it. I mostly use D3 for its utility methods, and a JS framework like React to handle all of the rendering, and I really want other people to be able to discover those functions without first "learning d3".
- therein 7y agoThat's fair. In that case, that explains why you did such an excellent job with especially the sections regarding DOM manipulation. All the visualizations with the accompanying code and the transitions were fun to follow, clear and informative.
- thibautg 7y agoYour article is very impressive, really good work! These days I also tend not to use d3 for DOM manipulation, but only for its powerful helper functions (d3-scale, d3-array, d3-shape, d3-geo etc.) I even try not to import d3-selection except for very specific cases. I’m using Vue for DOM manipulation, and computed properties play very well with d3 helper functions (i.e. a scale which auto-updates itself reactively). In a way it’s very similar to ObservableHQ’s reactivity. Most examples from Observable can be relatively easily converted to Vue with computed properties.