Using D3 with Ember


Just curious, who out there has been using D3 with Ember? Are you interested in seeing this pair of technologies evolve and mature? What limitations have you run into?


I’ve been using D3 and Ember together for quite some time.

I haven’t really run into any major limitations…Ember feeds my Ember-D3 component some pre-formatted data; then, I’ve got a few observers to watch for changes to that data…the rest is D3.

My only frustration (which is seems like the Ember community finds this is a valid one): D3’s and Ember’s code don’t really look good together. Now if D3 were rebuilt as an Ember library…that would be awesome.


I’ve been using d3 for pretty basic charting stuff. I wrote handlebars helpers for some of the more basic stuff which is horribly inefficient if I were to be dealing with a lot of live data (with those, it’s largely static).

Ember-charts by Addepar is pretty solid start for a basic integrated approach, and out of the box it’s good if all you need is some basic data visuals.

@Spencer_Price I’d be interested in creating a true d3-ember library at some point, and would contribute to such a project if it were begun by someone else.


One thing I like about keeping things separate is that the D3 code can be reused outside of Ember. One thought I had was making a type of generator for building Ember components out of D3 charts. So, you’d build a standalone D3 chart, and then feed it to the generator and describe the API you want your Ember component to have (e.g. a width property, which would automatically bind to a width accessor on the chart).

That way you could take existing D3 charts and make them Ember components very easily, and also people could customize the chart before brining into Ember. Although, I’m not sure if the data bindings would be tricky to get right.