d3 csv data loading

后端 未结 3 1915
时光说笑
时光说笑 2020-12-08 05:23

I am trying to adapt a simple scatterplot program in D3 to accept a CSV file. When I use the data in the file it works just fine, but when I try to load the CSV file it simp

3条回答
  •  一个人的身影
    2020-12-08 05:58

    Using d3.csvParseRows (assuming D3 v5)

    d3.text('/data/output.csv')
      .then( text => d3.csvParseRows(text) )
      .then( d => console.log(d) );
    

提交回复
热议问题