title: D3.js X axis as index number
body: <p>I have a relatively straight forward question: How can I have x be defined as the index number that is returned from the tsv file I'm parsing using data.map and/or d3.tsv()?</p>
  
  <p>Consider the following code:</p>
  
  <pre><code>d3.tsv("data.tsv", function(error, data) {
    if (error) throw error;
  
    data.forEach(function(d) {
      d.x = +d.x;
      d.y = +d.y;
    });
  </code></pre>
  
  <p>I need to adapt this code slightly, because my .tsv actually only has 1 column of data, the y values. Instead of going into the .tsv and adding a new column that counts from 1 to n, is there someway of just defining my x values to be whatever the index of +d.y is?</p>
  
  <p>I tried using google, but the word 'index' is so general, I just got a bunch of documentation that didn't get to what I was after.</p>
  
  <p>Hopefully it's a quick fix, let me know if you got a way,</p>
  
  <p>Thank you</p>