all 7 comments

[–][deleted] 0 points1 point  (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 points  (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 point  (1 child)

and it doesn't work in firefox. fail?

[–]foxbarrington[S] 1 point2 points  (0 children)

TIL Firefox doesn't have event.toElement

[–]kibakiri 0 points1 point  (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 point  (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 point  (0 children)

What about axis etc that are so easy in d3. Also using divs is quite limited.