score:1

Accepted answer

These numbers are getting loaded as Strings, and that's causing unexpected behavior of d3.max. You need to cast the values into Numbers.

You can turn them into numbers via Number(d.y) or (parseInt, parseFloat). In d3 you often see it shortened as y: +d.y.

With d3.csv you can specify a function where you can do this conversion as it parses. See documentation.


Related Query

More Query from same tag