1

I'm trying to find the equivalent to the solution posted here for D3 v7 so I can have D3 read a column as numeric instead of a string.

Here's the code in the link:

var dataset = d3.csv("file.csv", function(data){
  data.forEach(function(d){ d['columnName'] = +d['columnName']; });   
  console.log(data);     
});

I also tried data.row(function(d)... but also received an error.

Gregg
  • 99
  • 1
  • 6
  • 1
    d3.csv changed in d3v5, now you use `d3.csv("url").then(function(data) { ... })`. See [here](https://stackoverflow.com/a/49604124/7106086) – Andrew Reid Jul 08 '21 at 21:10

0 Answers0