How to read in CSV with d3 v4?

前端 未结 5 1387
猫巷女王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:40

    You can get csv data into d3 like the following -

    // get the data
    d3.csv("data.csv", function(error, data) {
      if (error) throw error;
          console.log(data);
          //format data if required...
          //draw chart
    });
    

提交回复
热议问题