title: only display certain hours with d3.js
body: <p>I'm charting stock prices with an interval of ten minutes and length of 10 days.  Of course the stock market is only open between 9:30 and 4.  How do I only display the portion of the chart that is between 9:30am and 4?  For example google finance charts <a href="https://www.google.com/finance?q=AAPL" rel="nofollow">https://www.google.com/finance?q=AAPL</a></p>
  
  <pre><code>var margin = {top: 10, right: 10, bottom: 10, left: 10};
  var width = $('#'+stock.symbol+'_graph').width() - margin.left - margin.right;
  var height = 100 - margin.top - margin.bottom;
  
  var x = d3.time.scale().range([0, width]);
  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");
  
  var line = d3.svg.area()
      .x(function(d) { return x(d.date); })
      .y1(function(d) { return y(d.price); })
      .y0(height);
  
  var svg = d3.select('#'+stock.symbol+'_graph').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 + ")");
  
  x.domain(d3.extent(stockHistory, function(d) { return d.date; }));
  y.domain(d3.extent(stockHistory, function(d) { return d.price; }));
  
  svg.append("path")
      .datum(stockHistory)
      .attr("class", "line")
      .attr("d", line);
  </code></pre>