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 + ")")

Here is your updated fiddle:

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

Related Query

More Query from same tag