Created
February 3, 2020 18:08
-
-
Save acqant/719b1c052259bf9ae82d894127230fa3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cells | |
regex = /\// | |
rows | |
.selectAll("td") | |
.data(d => Object.values(d)) | |
.join("td") | |
// update the below logic to apply to your dataset | |
.attr("class", function(d) { | |
if (d.match(regex)) { | |
return 'date_f' | |
} else if (d > 2) { | |
return 'high' | |
} else if (d < 3) { | |
return 'low' | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment