score:0

Accepted answer

Have you taken a look at the console? I checked your fiddle and you have an error:

Uncaught TypeError: Object [object Array] has no method 'hScale'

And, it seems like it's been caused by:

svg.selectAll("rect")
    .data(newArray)
    .enter()
    .append("rect")
    .attr("x", (k++) + 2)
    .attr("y", 125)
    .attr("width", 2)
    .attr("height", function (d, i) {return d.hScale(d[1]);});

The last line should just be return hscale(d[1]); instead of d.hscale.


Related Query