title: d3 .tsv file does not work
body: <p>Hi i have just started on using d3 as a data visualisation tool and I was following this tutorial: <a href="http://bost.ocks.org/mike/bar/" rel="nofollow">http://bost.ocks.org/mike/bar/</a></p>
  
  <p>However, my code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;style&gt;
  
  .chart rect {
    fill: steelblue;
  }
  
  .chart text {
    fill: white;
    font: 10px sans-serif;
    text-anchor: end;
  }
  
  &lt;/style&gt;
  &lt;svg class="chart"&gt;&lt;/svg&gt;
  &lt;script src="http://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  
  var width = 420,
      barHeight = 20;
  
  var x = d3.scale.linear()
      .range([0, width]);
  
  var chart = d3.select(".chart")
      .attr("width", width);
  
  d3.tsv("data.tsv", type, function(error, data) {
    x.domain([0, d3.max(data, function(d) { return d.value; })]);
  
    chart.attr("height", barHeight * data.length);
  
    var bar = chart.selectAll("g")
        .data(data)
      .enter().append("g")
        .attr("transform", function(d, i) { return "translate(0," + i * barHeight + ")"; });
  
    bar.append("rect")
        .attr("width", function(d) { return x(d.value); })
        .attr("height", barHeight - 1);
  
    bar.append("text")
        .attr("x", function(d) { return x(d.value) - 3; })
        .attr("y", barHeight / 2)
        .attr("dy", ".35em")
        .text(function(d) { return d.value; });
  });
  
  function type(d) {
    d.value = +d.value; // coerce to number
    return d;
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>where the tutorial says to use d3.tsv does not work, as compared to a harrd coded html. can anyone shed some light on this? I've placed the <code>data.tsv</code> file in the same folder already.</p>
  
  <p>This is my .tsv file:</p>
  
  <pre><code>name    value
  Locke   4
  Reyes   8
  Ford    15
  Jarrah  16
  Shephard    23
  Kwon    42
  </code></pre>