This looks like the common problem of attempting to use the data outside of the callback from d3.csv - note that this function returns instantly and then later when the data is available, it calls the callback.
So at the time your chart is rendered, it has no data. Try moving the chart initialization into the callback.
(It'd be easier to verify this with a fiddle. ;-)