score:1

Accepted answer

Your date parsing function is not correct, it seems to mess up time zones, since new Date(string) apparently assumes UTC. This will work:

var format = d3.time.format("%Y-%m-%d");
function getDate(d) {
    return format.parse(d.date);
}

cf the updated fiddle.


Related Query

More Query from same tag