[1] - http://c3js.org/ [2] - http://www.chartjs.org/
What would you use for a very custom chart (something like a Gantt, say) ? D3 or something like snapsvg.io ?
I used to like Raphael a few years ago..
Can you explain what you mean by D3 + canvas? A secondary view?
Thanks, we are super excited about releasing this project as Open Source, it's been such a trip!
Totally, D3.js is a fantastic low-level library and is super reusable in all senses (examples, low-level plugins, different reusability patterns). However, one of D3.js usability problems comes from its main advantage, how powerful it is!
This means that D3 has a very low-level granularity and a huge API, making it hard for newcomers to create a simple chart for a dashboard or a one-off data viz.
That's one of the reasons why we created Britecharts, to democratize D3.js charts, and at the same time, serve as a stepping stone to those who want to learn more about D3.
In our mind, using Britecharts, a junior developer could render a chart quickly, just doing d3 selections. Then, she can start tinkering with one of the charts and even create a new one, learning d3.js in the process.
> Is the most apparent benefit less lines of code?
Yes! With "reusable components" you don't need to write (or copypaste) a line chart over and over.
From their demos:
brushChart
.width(containerWidth)
.height(300)
.onBrush(function(brushExtent) {
// Do something with the brushExtent
});
brushContainer.datum(dataset).call(brushChart);While D3 is low level, it's in no way just a "wrapper around SVG with some sugar thrown in".
Besides the tons and tons of helpers for scales, mapping, projections, calculations and all that jazz (including the animation stuff with enter/exit etc which you did mention), it's also a whole functional concept on top of the drawing primitives.
One could theoretically even remove SVG and add another rendering backend with D3 with the same top level primitives.
And don't even get me started on trying to make D3 charts responsive ;)
You have to work with the DOM + JS at fairly low abstraction level in order to get an output out of D3. It is be definition reusable.
It is extremely powerful though!
And, on most screens - even smartphones - they don't need to be responsive at ordinary dimensions.
Usually, the request seems to indicate a fundamental lack of understanding of how D3 is meant to be used, or design/page layout flaws that get dumped on the chart code.