I'm having a problem with scales in d3.js. As I type the min and max into the Firefox console, I get the max value as the min and the second-max value as the max. What's the problem here?
Here is my dataset in form of csv file:
word,occur
obama,11
theguardian,9
world, 8
state, 8
care, 7
pakistan,7
block, 6
blog, 6
healthcare, 5
here is what I type into the console and the values I get in return:
d3.min(dataset, function(d) { return d.occur}); => "11"
d3.max(dataset, function(d) { return d.occur}); = "9"
the d3.max should return me 11 and d3.min should return me 5