I have a dataset and a nicely working scatter plot:
http://pac12statcentral.com/testsite/temp/scatter/public_html/
I'm using d3.csv to pull in a data, and each column represents one variable displayed on each of the two axes.
However, you'll notice that when I set X: to "Safeties Given Up", that Many of the points move off the scale, because there are several NaN values in that particular column.
Is there a way to filter to remove the rows in which either of the columns contain a NaN value?
For example:
if x = [1 2 3 4 NaN] and y = [6 NaN 8 9 10], I would get a result of x = [1 3 4] and y = [6 8 9] ?
I've tried:
var pts = svg.selectAll("circle").data(data).filter(function(d) {return !isNaN(d[axes.Axis]); });
But that doesn't work for me.
Thanks,
JIm