score:0

Just append rectangle to the SVG that's it.

svg.append('svg:rect')
    .attr('width', width + margin.right + margin.left)
    .attr('height', height + margin.top + margin.bottom)
    .attr('fill', 'white');

Related Query

More Query from same tag