D3.selectAll.call component factory function

I would like a new one to be function

called on every item in the result set selectAll

.

If I execute d3.selectAll(...).call(factory(...))

, the same function is called for each item. factory(...)

returns a component that can have state.

Is there something in the D3 API to do this? Or will I have to come up with something like d3.selectAll(...).each(function() { d3.select(this).call(factory(...)) })

? Will this work?

+3


source to share





All Articles