Last active
May 17, 2021 18:07
-
-
Save ng-the-engineer/ab0d4333a228f3b898b6e2fd3c162055 to your computer and use it in GitHub Desktop.
Code snippet of tutorial bubble plot
This file contains hidden or 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
svg | |
.append("g") | |
.selectAll("dot") | |
.data(data) | |
.enter() | |
.attr("class", "bubbles") | |
.attr("cx", (d) => x(d.lastUse)) | |
.attr("cy", (d) => y(d.exp)) | |
.attr("r", (d) => z(d.competency ** 3 / 100)) | |
.style("fill", (d) => myColor(d.category)) | |
.on("mouseover", showTooltip) | |
.on("mousemove", moveTooltip) | |
.on("mouseleave", hideTooltip); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment