title: In d3.js ticks are not showing in the x axis
body: <p>I am trying to show a barchart using d3.js. Y axis contains the speed and x axis contains time. I am using the following code:</p>
  
  <pre><code>var margin = {top: 20, right: 20, bottom: 70, left: 40},
  width = 400 - margin.left - margin.right,
  height = 250 - margin.top;
  var x = d3.scale.ordinal().rangeRoundBands([ 0, width ], .1);
  var y = d3.scale.linear().range([ height, 0 ]);
  
  var xAxis = d3.svg.axis().scale(x).orient("bottom");
  
  var yAxis = d3.svg.axis().scale(y).orient("left").ticks(20);
  
    x.domain(data.map(function(d) { return d.datetime; }));
    y.domain([0, d3.max(data, function(d) { return d.speed; })]);
  
  
  var svg=d3.select("#bar").append("svg").attr("width", width + margin.left + margin.right)
  .attr("height", height + margin.top + margin.bottom).append("g").attr("transform", 
            "translate(" + margin.left + "," + margin.top + ")");
  
     var transition = svg.transition().duration(750), delay = function(d, i) {
      return i * 50;
  };
    svg.append("g")
        .attr("class", "x axis")
        .attr("transform", "translate(0," + height + ")")
        .call(xAxis)
        .selectAll("text")
        .style("text-anchor", "end")
        .attr("dx", "-.8em")
        .attr("dy", "-.55em")
        .attr("transform", "rotate(-90)" ).text("Time");
  
    svg.append("g")
        .attr("class", "y axis")
        .call(yAxis)
        .append("text")
        .attr("transform", "rotate(-90)")
        .attr("y", 6)
        .attr("dy", ".71em")
        .style("text-anchor", "end")
        .text("Speed");
  
    svg.selectAll("rect")
        .data(data)
        .enter().append("rect").transition().delay(0)
        .style("fill", "red")
        .attr("x", function(d,i) { return 30*i+20; })
        .attr("width", 25)
        .attr("y", function(d) { return y(d.speed); })
        .attr("height", function(d) { return height - y(d.speed); }); //function(d){return " "+d.datetime;}
  
    transition.select(".y.axis").call(yAxis);
  </code></pre>
  
  <p>But unfortunately no ticks are showing in the x axis. Y axis ticks are working fine. Can anyone help me regarding this?</p>