by fouronnes3 · 5y ago · 0 comments
Over the past year I've done it finally, and I can recommend the book "D3 for the impatient". It's written for D3 v4.x, but I wanted to write my project with D3 v6, obviously. Luckily, just going for it and googling the error message when I got the inevitable "foo is not a function" was easy enough. Now I'm confident enough with it that just reading the github readme of a new D3 module is usually enough to get me going.
But the API has quite a bit rough edges (like the difference between select and selectAll, the selection.merge(enter) pattern), that a good book is really nice. Especially since online tutorials are a complete mess - because of Observable non-sense and severe API rotting.
https://github.com/janert/d3-for-the-impatient
> All examples have been verified to work with this version of the D3 library (D3 Version 5.9.2, downloaded 15. Apr 2019)
So, not quite V6, but a lot more up-to-date than v4.
'D3 for the impatient' is indeed an excellent book and was my entry point into using D3 aswell.
document.getElementById("myRoot").appendChild(svg.node());
and remove the yield
Thats it. But apparently you all don't know this, because you don't want to understand D3 or basic DOM APIs beyond ctrl-c/ctrl-v.