4 ms·
D3 runs in the browser and it manipulates DOM nodes, a very high level abstraction. You can accomplish something with it using SVG, which is again a high level
by locallost 2y ago
D3 runs in the browser and it manipulates DOM nodes, a very high level abstraction. You can accomplish something with it using SVG, which is again a high level abstraction. You can give it data and it will spit out numbers that you can use to draw something on the screen. You can bind that data to elements and it will keep track of what's entering and what's exiting. You can apply fancy transitions with a line of code! You can make it change an appearance of e.g. a graph by changing the interpolation method. And so on.
Sure you have to write code, but it does a lot of things in the background that would take you s lot longer to do yourself. High level is not just "here's a library on top of D3 that you just give data to and you're done, but then you have to cry for days because you need to do something it didn't think of - 80% of use cases". When I used it I didn't get it, but then I took some time, a couple days, to actually understand it and I got a lot more productive. It's a great feeling when instead of thinking in workarounds for a missing configuration option you can think in solutions for the actual task. A lot quicker and more rewarding.
I didn't do much computer graphics in my life, some mandatory university classes, but I'd say doing it on the simplest beginner level it was a much different experience.
- wisemang 2y agoFair enough. I meant specifically in the context of data visualization libraries, having done a fair bit of that sort of work in my own career. It’s harder to make a basic chart in d3, compared to many out of the box solutions, but it’s possible to do pretty much whatever you want, thanks to (what I consider) the low-ish level of abstraction it provides. I.e. DOM manipulation vs direct specification of standard chart attributes.