Created
April 21, 2020 13:17
-
-
Save afrinc/3fe50772a8923b42b984778e75ac95e8 to your computer and use it in GitHub Desktop.
adding circle inside rectangular node
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
const count_circle = g | |
.append("svg:circle") | |
.attr("class", "countCircle") | |
.style("visibility", "unset") | |
.attr("r", 10) | |
.attr("cx", function(d) { | |
let X = outerNodebbox.x; | |
let WIDTH = outerNodebbox.width; | |
return X + (2.5 * WIDTH) / 3; | |
}) | |
.attr("cy", function(d) { | |
let Y = outerNodebbox.y; | |
let HEIGHT = outerNodebbox.height; | |
return Y + (2 * HEIGHT) / 3; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment