score:1

Looks like you're missing clip path, that is hiding data outside chart domain. It's all in the example you're using.

CSS:

.area {
    fill: steelblue;
    clip-path: url(#clip);
}

JS:

svg.append("defs").append("clipPath")
    .attr("id", "clip")
    .append("rect")
    .attr("width", width)
    .attr("height", height);

Related Query