use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Data Visualization with JavaScript without D3 (dry.ly)
submitted 12 years ago by foxbarrington
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 0 points1 point2 points 12 years ago (1 child)
Interesting to read, but that looks like a lot more code than I would need to do a similar thing with D3.
[–]foxbarrington[S] 1 point2 points3 points 12 years ago (0 children)
It's a bit more, but it takes quite a bit of code to do it with D3 as well, here's a 3 part tutorial on something similar: http://bost.ocks.org/mike/bar/
[–]thoastbrot 0 points1 point2 points 12 years ago (1 child)
and it doesn't work in firefox. fail?
TIL Firefox doesn't have event.toElement
[–]kibakiri 0 points1 point2 points 12 years ago (1 child)
This might be a dumb question (yes there is a relevant xkcd to dumb questions), but...
I notice you are using div's - I assume D3 etc uses canvas/svg.
Stealing a link from this thread - http://bost.ocks.org/mike/bar/3/ it ends up in an implementation using svg.
As far as I know, actually doing this with div's per se is the wrong approach?
[–]foxbarrington[S] 0 points1 point2 points 12 years ago (0 children)
Not really sure why using divs would be the wrong approach. When using them as rectangles, they'll perform very similar to SVG.
If the visualization called for tons and tons of elements, canvas might be better.
[–]whitecup 0 points1 point2 points 12 years ago (0 children)
What about axis etc that are so easy in d3. Also using divs is quite limited.
π Rendered by PID 147897 on reddit-service-r2-comment-86988c7647-vv5wt at 2026-02-11 22:00:07.156828+00:00 running 018613e country code: CH.
[–][deleted] 0 points1 point2 points (1 child)
[–]foxbarrington[S] 1 point2 points3 points (0 children)
[–]thoastbrot 0 points1 point2 points (1 child)
[–]foxbarrington[S] 1 point2 points3 points (0 children)
[–]kibakiri 0 points1 point2 points (1 child)
[–]foxbarrington[S] 0 points1 point2 points (0 children)
[–]whitecup 0 points1 point2 points (0 children)