I am in the process of constructing a D3JS chain that concludes with a .call() function. Below is my current chain:
foo.selectAll('svg')
.data(data)
.enter()
.append('svg')
.classed('someclass', true)
.call(someFunc);
Once it reaches the .call() function, it enters into the realm of D3JS functions.
d3_selectionPrototype.call = function(callback) {
var args = d3_array(arguments);
callback.apply(args[0] = this, args);
return this;
};
The this
object appears to be empty and results in an error message saying "Cannot read property length of undefined". The issue seems to occur randomly. Can anyone shed light on why or how this could be happening?
EDIT
I am working within a JavaScript framework that incorporates view composition. The D3JS call is made during the initial invocation of the model that drives the view.