6 ms·
I've said it before and I'll say it again, I'm always skeptical of any wrapper around D3 that tries to make it more reusable. D3 is built with reusability in mi
by sdegutis 11y ago
I've said it before and I'll say it again, I'm always skeptical of any wrapper around D3 that tries to make it more reusable. D3 is built with reusability in mind, considering it uses functions and objects for everything. I wrote 300 lines of D3 that made a graph which has all the features we need, and no single D3 wrapper library could have provided all that functionality for us, nor could they be mixed together to provide it for us. That said, I enjoy seeing new ones come out because they usually offer new ideas for different ways to visualize data or interact with it.
- jonahx 11y agoYou see these things because d3 is fairly low level. If I just have some data and want a bar chart, I basically want to pass the data to "BarChart", with some possible configuration options. You can't do this with raw d3. With d3, you are responsible for drawing and spacing your bars, creating your axes, etc. This is intentional, of course. d3 aims to give a set of building blocks that you can be used to create any possible visualization you can think of. It's not aiming to be a high-level graphing library with a limited set of pre-built graphs. But those libraries fill a perfectly valid need as well.
- IE6 11y agoBasically this - we opted for google charts rather than d3 for a few projects because we wanted to keep the investment low and essentially all we wanted was barChart() pieChart() methods that we pass data into. Yes we could have built it once and reused but the uglier google chart was already there.
- sdegutis 11y agoThat's a good point, and in fact I may look into Google Charts once more. Thanks for the perspective.
- forrestthewoods 11y agoAt times I'm skeptical of D3 as a wrapper around fundamental JavaScript functions. Sometimes it's simpler just to build your own damn <path> objects than it is to try and finesse D3 into building the object(s) where and how you want. D3 does provide quite a lot of out of the box. But if you find yourself outside that box it might be worth doing it yourself.
- keypusher 11y agoI recently built a simple site using Vincent, which is a Python visualization library using D3 & Vega. Generating the graph was only a dozen lines of code or so for me. Sometimes you don't need the full power of the underlying library, you just want to get something up and running quickly for a prototype. There's always a tradeoff of control when going to a higher abstraction layer. https://github.com/wrobstory/vincent https://github.com/wrobstory/vincent
- bitcointicker 11y agoAs someone who has also played around with d3 to create hand cranked charts, which you can see here http://bitcointicker.co/bitstamp/ http://bitcointicker.co/bitstamp/ ..... (it can be quite tedious) I fully appreciate nvd3, which can be used to quickly make pretty charts like these http://charts.bitcointicker.co/ http://charts.bitcointicker.co/