4 ms·
As I usually point out when D3 libraries come up, using a library like this will only get you so far. It's amazing how many feature requests are sprinkled thro
by couchand 12y ago
As I usually point out when D3 libraries come up, using a library like this will only get you so far. It's amazing how many feature requests are sprinkled throughout the comments here, and every one of them would be trivial changes if you're working with the underlying D3 principles.
Spend a little time learning how D3 works. It will be well worth it. To get started, read through any tutorial you find written by Mike Bostock.
Required reading: Let's Make a Bar Chart[0], Thinking with Joins [1], How Selections Work [2], General Update Pattern [3], Nested Selections [4], Object Constancy [5], Working with Transitions [6], Three Little Circles [7].
For more tutorials, check out this list on the D3 wiki [8].
[0]: http://bost.ocks.org/mike/bar/ http://bost.ocks.org/mike/bar/
[1]: http://bost.ocks.org/mike/join/ http://bost.ocks.org/mike/join/
[2]: http://bost.ocks.org/mike/selection/ http://bost.ocks.org/mike/selection/
[3]: http://bl.ocks.org/mbostock/3808218 http://bl.ocks.org/mbostock/3808218
[4]: http://bost.ocks.org/mike/nest/ http://bost.ocks.org/mike/nest/
[5]: http://bost.ocks.org/mike/constancy/ http://bost.ocks.org/mike/constancy/
[6]: http://bost.ocks.org/mike/transition/ http://bost.ocks.org/mike/transition/
[7]: http://bost.ocks.org/mike/circles/ http://bost.ocks.org/mike/circles/
[8]: https://github.com/mbostock/d3/wiki/Tutorials https://github.com/mbostock/d3/wiki/Tutorials
- namuol 12y agoBecause the first thing I should be expected to do when choosing to use a library to achieve my data-viz goals is to read through a dozen tutorials about a needlessly-complex API.
- couchand 12y agoIt's not at all "needlessly complex". In fact, it's remarkable how much power you can get from just a few orthogonal instructions. Yes, it requires that you form a decent mental model of the system, but what it unleashes is so valuable that I promise you it's worth it. It's very much like learning a programming language: hard at first, but with a bit of experience you can do things you never thought possible.
- coldtea 12y agoBecause if data-viz is actually your goal, and not a secondary aspect of your work, then you SHOULD read tons of tutorials and learn the low level workings. The advice the parent gave is meant for people working on projects where visualization is important. Not for those just needing to show a few plots quikcly in some other kind of project. If you work is heavy on data-viz then you very much should read into all this. The same way we wouldn't consider someone a programmer if he just bought some shrinked wrapped software and installed it. Plus the "needlessly complex" accusation is total BS. In fact it's considered one of the best designed APIs by most experienced developers -- check the interwebs for references to that, and is amazingly coherent, giving you only what you need for any specific problem, instead of forcing you to tons of boilerplate or irrelevant trivia.
- namuol 12y agoI'll give it another shot (I have to for my current project) -- but I don't think my initial assessment is "total BS". I understood what D3 was doing under the hood, and experienced a lot of friction/confusion when I needed to build and manipulate a specific SVG tree structure. The fact that D3 expects me to understand the low-level SVG structure and yet provides me with a model that doesn't intuitively mesh with this model is the source for most of my confusion and frustration, I expect.
- jjguy 12y ago+1 based on my own experience. I still don't grok The D3 Way, despite having used it several times in production projects. I've taken the easy way out and used a D3 library a couple times and been disappointed by precisely what counchand refers to: changes that should be trivial resulting in notable implementation pain. (but I like the looks of this - and kinda want to kick the tires and give it a shot!)
- dirtyaura 12y agoPartly true, but visualizing timeseries is full of little details and gotchas, and taking care of all of them on top of standard d3.js is quite a big chunk of work. There's a lot of value on higher level libraries that make opinionated decisions how e.g. gaps, data point highlights, zooming, rounding, axis labels and tons of other details work.
- ryanmarsh 12y ago+1 This cannot be stressed enough. There is a learning curve for D3 but if you invest the time you'll get out more than you put in. Without really understanding how to do "hard" things in D3 libraries like this and Square's Crossfilter won't get you very far beyond the examples given.
- hamilton 12y agoHi - author here. Completely agree - if you want to make much more complex data graphics, learning the nuts and bolts of d3 is vital. You certainly can't escape that. But I would add that not everyone wants to make more complex ones. For a lot of needs, 'using a library like this will only get you so far' is often exactly what folks need. Many of us just want to make charts that work really well, and are really simple to use. We grew tired of having to re-implement the same ideas over and over again for new dashboards and reports. Hence this library - a way of simplifying what we've already done, and making it easier to add new features in a principled way.
- capkutay 12y agoI consider D3 a rather low level solution for data visualization. It gives you the bits and pieces for making paths, axises, and svg's that users can interact with. If you just want a simple, good looking line chart with legends and tool tips, you're better off using a library like MetricsGraphs, highcharts (not based on d3), or nvd3. If making custom, unique visualizations is your day job, then d3 is the right way to go.
- thomasfl 12y agoIs there any web based D3 "wysiwyg" editors that generates readable javascript that only uses D3? That would be something in between using "raw" D3 and libraries built on D3. Another common way to make visualisations is to modify examples found on bl.ocks.org. Just let it be said: there's definitely room fore even more libraries built on top of D3.