score:2

Accepted answer

You will need to set the domain of x axis:

var x = d3.scaleLinear()
    .domain([0,12]) //you have not defined the domain
    .rangeRound([0, width]);

working code here


Related Query