Hacker News new | past | comments | ask | show | jobs | submit login

D3 is not a charting library but a data visualization library with which one can produce standard charts. The code required to create a simple line chart in D3 spans dozens of lines, not including the data. Using a charting library it is usually one or two (plus options).



Lots of libs advertise 0 dependencies. I'm not fussed if a library depends on D3 though. D3 is 80k gzipped, this is 15k gzipped, ChartJS is about 20k gzipped. If you need one chart, sure, go for it.

But each of those libraries would be <5kb of D3-dependent code. With the added benefit that:

1. The code is much simpler and easier to understand and contribute to

2. Knowing D3 means you can modify the visuals, fork the library, and customize it without spending ages wading through unnecessary and unfamiliar re-implementations of D3 primitives. So many requirements I've seen involve tweaking visuals just far enough that a pre-baked library ceases to cut it.

3. Chart authors can rely on those primitives for a less buggy experience, given that they are tested and used elsewhere

4. D3 already supports IE9+, which this library doesn't

5. You have the power of D3 to build your own dataviz


Yea, I’ve found similar use case where any custom work is much better off done using raw d3.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: