Accepted answer

I have been able to solve my problem by using svg tags, dropping the clipPath approach. Instead of:

this.curves_layer = this.svg.append('g');

I used:

this.curves_layer = this.svg.append('svg')
   .attr('height', this.height)
   .attr('width', this.width);

I didn't know it was possible to have multiple svg tags nested. Apparently it is and everything outside a given svg is clipped.

Related Query