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
javascript dom functional-programming d3.js


source to share


No one has answered this question yet

Check out similar questions:

6493
var functionName = function () {} vs function functionName () {}
2644
Is there a function "exists" for jQuery?
2256
Set default parameter value for JavaScript function
2201
How do you decide when to use Node.js?
1094
Loop inside React JSX
1021
Is Functional Programming Replacing GoF Design Patterns?
1001
Is Safari iOS 6 caching $ .ajax results?
793
Why is setTimeout (fn, 0) sometimes useful?
763
How can I check if a string contains a substring?
643
How can I remove all CSS classes using jQuery?



All Articles
Loading...
X
Show
Funny
Dev
Pics