javascript - D3JS .call() Exception -
javascript - D3JS .call() Exception -
i creating d3js chain .call() @ end. here current chain
foo.selectall('svg') .data(data) .enter() .append('svg') .classed('someclass', true) .call(somefunc);
when reaches .call() goes d3js function
d3_selectionprototype.call = function(callback) { var args = d3_array(arguments); callback.apply(args[0] = this, args); homecoming this; };
the this
not contain , returning exception of message: cannot read property length of undefined
. unfortunate thing happens sporadically. know of why or how happening?
edit
i using javascript framework implements view composition. current d3js phone call beingness made when model driving view first beingness called.
i solved issue on own , leave assist may have same issue in future. added edit question helps gives more context total issue.
the solution since d3js chain beingness called when model driving view setting there wasn't thing in dom d3 select. moved chain called 1 time dom had been rendered , able run smoothly.
javascript d3.js
Comments
Post a Comment