title: Loading csv file with d3.js v.4
body: <p>I am new to d3 and javascript and can't work out the following.</p>
  
  <p>I'm trying to load a csv file with d3.csv but encountered a problem. </p>
  
  <pre><code>d3.csv("data2.csv")
      .row(function (d){
          return {
              ax: Number(d.ax.trim().slice(1)),
              ay: Number(d.ay.trim().slice(1))
          };
      })
      .get(function (error, data){
          console.log(data)
      });
  </code></pre>
  
  <p>My csv file is </p>
  
  <pre><code>ax,ay,az 
  1,40,50 
  2,41,49 
  3,39,52 
  4,35,49 
  5,34,46 
  6,33,45 
  7,32,42 
  8,30,40 
  9,29,32 
  10,27,26
  </code></pre>
  
  <p><code>console.log</code> is giving me the following:</p>
  
  <pre><code>(10) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, columns: Array(3)]
  0    :    {ax: 0, ay: 0}
  1    :    {ax: 0, ay: 1}
  2    :    {ax: 0, ay: 9}
  3    :    {ax: 0, ay: 5}
  4    :    {ax: 0, ay: 4}
  5    :    {ax: 0, ay: 3}
  6    :    {ax: 0, ay: 2}
  7    :    {ax: 0, ay: 0}
  8    :    {ax: 0, ay: 9}
  9    :    {ax: 0, ay: 7} 
  </code></pre>
  
  <p>The results for <code>ax</code> are 0 which is incorrect and <code>ay</code> is obviously also incorrect.
  How can I get the numbers correct, stored in a array, so that I can continue plotting the data using d3.js version 4?</p>