3 ms·
Love all D3 content, but I'd add that the data binding just to create svg is not the real reason - after all, you can do this declaratively using most modern fr
by jwilber 1y ago
Love all D3 content, but I'd add that the data binding just to create svg is not the real reason - after all, you can do this declaratively using most modern frameworks by directly iterating over the data and returning a positioned element (fwiw this is how I prefer to use it today). The reason is because of the complexity within d3 selection, namely the enter/update/exit + transition capabilities: https://www.d3indepth.com/enterexit/ https://www.d3indepth.com/enterexit/
Another thing worth mentioning that newcomers seem to take for granted - the margin boilerplate required for correct positioning (see https://observablehq.com/@d3/margin-convention https://observablehq.com/@d3/margin-convention).