This looks great, but it feels a bit imperative vs the fluent, chainable style of d3 where it is most likely to be used. Specifically, you have to .each each time you'd want to use this for particular data.
Not that I can imagine what they'd be (other than maybe direction), but as you add more configurable features, rather than passing them as a big old jquery-style config object, how about an API like this (loosely based on the example in the readme):
This looks great, but it feels a bit imperative vs the fluent, chainable style of d3 where it is most likely to be used. Specifically, you have to
.each
each time you'd want to use this for particular data.Not that I can imagine what they'd be (other than maybe direction), but as you add more configurable features, rather than passing them as a big old jquery-style config object, how about an API like this (loosely based on the example in the readme):