score:5

Accepted answer

All you need to do is change the x to y and y to x in your area definition:

var area = d3.svg.area()/*.interpolate("basis")*/
    .y(function(d) { return x(d.x); })
    .x0(function(d) { return y(null); })
    .x1(function(d) { return y(d.y0 + d.y); });

Complete example here.


Related Query