Creating d3.selection.enter.prototype in v4?

I have some existing d3 code that stops working after I upgraded to the latest version of D3 4. It looks like I can no longer expand the selection using this approach ...

d3.selection.enter.prototype.mything = function()
{
    var linkEnter = this.append("line").... etc
    return linkEnter;
}

This syntax now gives me an error ...

  • TypeError: d3.selection.enter undefined

Does anyone know how to expand choices in v4 from D3?

+4
source share

All Articles