the x axis is where you choose to draw it.
assuming you have a container svg of width w,
if with this settings you do
svg.append("line").attr("x1",
0).attr("x2",w).attr("y1",y(0)).attr("y2",y(0)) then you will draw the
x axis in a place consistent with the rest of the chart.
alternatively, if the x axis needs to sit at height pixels from the
top, you can try y=d3.scale.linear().domain([0,ymax]).range([height,
0]).
now, any negative value passed to y will get a value greater than
height in return. While some browsers allow for this I don't recommand
trying to draw outside your svg container.