Hacker News new | past | comments | ask | show | jobs | submit login
D3 map scrollers (geoexamples.com)
102 points by sebg on May 31, 2016 | hide | past | favorite | 10 comments



I really think the power of D3.js is within the ability to do "view source" or "inspect element" and look into exactly how things are rendered and being able to change things dynamically to reproduce your needed behavior. You really don't have this power with other charting libraries/tools/frameworks.

You can't do this with <canvas /> and that's why I think it falls a bit short. With the virtual DOM it also gets harder "changing stuff from the console", but I guess there are extensions that allow you to do that as well.

But anyway, the DOM seems like a great abstraction, not just for doing UI, but also for building complex dataviz. But not because of performance, or because it's on "the Web". Simply because it's transparent and allows for copy-paste viral effect. We should keep this in mind when building future platforms.


Oops, meant to upvote, but ended clicking the wrong button...

Too bad you can't fix it as it is now, it'll be nice if somehow for a limited time you could revert your vote.


Albeit, you can also work witch canvas, when using D3.js. This is especially useful, when you want to max out performance, wich is not the very best when using svg.



It seems to work well only on chrome (issues with Safari, partially working on iPhone though). Similar issues with [1].

There's also some minor horizontal scroll which makes the experience slightly weird, but this can easily be fixed with overflow-x: hidden;

[1] http://vallandingham.me/scroller.html



After scrolling through the first one, I had to swipe left (gesture to go back on Mac) so many times to get back here.


That first one did a number on my back history, unfortunately.


Being someone who has never used D3.js, every time I see a story about D3 I think of Blizzard's Diablo 3 title. My thought on this headline was "Hey, that's cool... Someone wrote a hack that allows you to scroll around D3 maps!" I was thoroughly disappointed. :(


As someone who work a lot with d3.js and is constantly getting search results relating to Diablo 3 I can appreciate your frustration.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: