Earlier quoted context omitted.
Probably a reference to Clojure's arrow operator: https://blog.frankel.ch/learning-clojure/2/ Something like a(b(c(d(e(7)))))) in Javascript could be written (-> 7 e d c b a) in Clojure?
Bingo.
Why is D3 so Verbose?
71–75 of 75 posts
Re: Why is D3 so Verbose?
#72I could not get over the fact that 0,0 in d3 is the top left corner instead of the bottom left. Why?? Everything in real life uses bottom left for 0,0! Probably because the first EGA/VGA accelerators worked this way to save one instruction in the most common use case and things never change....
It's not a d3 thing, it is an SVG thing. It's pretty much the standard for 2d computer graphics. Also same in CSS.
[1] and before that, a "every screen is a CRT TV with a photon gun that 'draws' lines, starting in the top left"-thing
Re: Why is D3 so Verbose?
#73I could not get over the fact that 0,0 in d3 is the top left corner instead of the bottom left. Why?? Everything in real life uses bottom left for 0,0! Probably because the first EGA/VGA accelerators worked this way to save one instruction in the most common use case and things never change....
It predates EGA. Most/all 8bit BASIC systems were top left, and they got it from somewhere earlier. Spreadsheets are top left, as are lots of other apps graphical or otherwise. The web (CSS, SVG etc). OpenGL etc etc. CRTs scanned downwards, most people read downwards. I would say that nearly everything in the real world (outside math) especially computer related uses top left as an origin.
I concede that point, its not want to meant, but I did express my point poorly.
My point is:
- A lot of things work like books[1]: top-left to bottom-right
- However, 99+ % of graphs (anything from revenue numbers to health data) in all mediums (books, newspapers, websites) use a bottom-left origin. Never seen a revenue bar growing from top to bottom. In fact, I dont remember the last time i have seen a graph not using the I. Quadrant. Do you?
- D3.js (imo) is a lib to create graphs from data, but does not abstract this problem away? Why?
[1] "western/latin"-style books ofcRe: Why is D3 so Verbose?
#74More granular control, more verbosity. I am still proud of the D3 gadget I made about 8 years back as a green web dev. Couldn't have made it any other way, not sure if I could with any other library today . Wouldn't want to do it again, though, unless I was a dedicated front-end guy.
What was the gadget? I'm also more of a back-end guy that occasionally does front-end. I have a strong design taste, but it takes a lot of effort to improve my skills be able to act on it. I feel like D3 appeals to people with a strong sense of taste.
Re: Why is D3 so Verbose?
#75First of all, shocked people still use d3. Hasn't there been something better? It's pretty ancient by javascript standards. Do people still use jquery too? Haha... been about a decade since I touched this stuff! Second of all, isn't it ungodly slow? I get that it can draw a few boxes nicely, and maybe shuffle them around, but I had to write my own engine using html canvas because d3 couldn't get svg to flow properly…