score:1

In D3 we normally call axis the variable referring to the axis generator, not to the group that contains it. Other than that, this is indeed the most common way to call the axis:

var gX = chart.append("g")
    .attr("class", "axis")
    .attr("transform", "translate(" + 140 + "," + 450 + ")")
    .call(d3.axisBottom(x));

Here is your updated fiddle: http://jsfiddle.net/5yqkz1z5/

PS: change the magic numbers in the translate function accordingly.


Related Query

More Query from same tag