Instead of line
y.domain(d3.extent(metrics, function(d) { return d.close; }));
use
y.domain([d3.max(metrics, function(d) { return d.close; }) + 0.01,
d3.min(metrics, function(d) { return d.close; }) - 0.01]);
The thing is, if y scale is just segment of length 0, like [5.0, 5.0] (or any other number other that 5.0), d3 is totally confused, and refuses to display anything on y axis, and places 5.0 right at origin.
With new code: the following is obtained for the same case:
]
Here is also link to jsfiddle.