Skip to content

Instantly share code, notes, and snippets.

@nkabrown
Last active March 14, 2016 19:53
Show Gist options
  • Save nkabrown/7f1bce2123d3caf3ca21 to your computer and use it in GitHub Desktop.
Save nkabrown/7f1bce2123d3caf3ca21 to your computer and use it in GitHub Desktop.
replace label with explanation on hover
// function to replace label with label's explanation on hover.
function mouseover() {
const s = d3.select(this)[0][0];
s.innerHTML = 'true positive rate';
s.className = 'explanation';
}
function mouseout() {
const s = d3.select(this)[0][0];
s.innerHTML = 'Sensitivity';
s.className = 'label';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment