How to read in CSV with d3 v4?

前端 未结 5 1388
猫巷女王i
猫巷女王i 2020-12-15 06:02

I\'m just having a little trouble understanding the documentation for CSV Parse with D3. I currently have:

d3.parse(\"data.csv\",function(data){
    salesDa         


        
5条回答
  •  遥遥无期
    2020-12-15 06:49

    Here is the code you can use to read csv file using d3.js

    
    
    

    Note that, the csv file name is "cars.csv", and the file is saved in a folder called csv.

    console.log(data[0])
    

    will help you to see the data output in the browser debug window. Where, you can also find if there is any error as well.

提交回复
热议问题