I am using d3js with data loaded from a CSV table. I put these values in a table and then want to set the color of the entries in column 10 depending on the value of column 2 and 3 (e.g., do something if the sum of the values in column 2 and 3 is positive).
I understand how to color one entry depending of its own value, but doing this depending of other values is beyond my programming skills. Can someone help me with this?
d3.select("#viz")
.append("table")
.style("border-collapse", "collapse")
.style("border", "2px black solid")
.selectAll("tr")
.data(parsedCSV)
.enter().append("tr")
.selectAll("td")
.enter().append("td")
.style("border", "1px black solid")
.style("padding", "2px")
.text(function(d){return d;})