Skip to content

Instantly share code, notes, and snippets.

@afrinc
Created April 21, 2020 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afrinc/3fe50772a8923b42b984778e75ac95e8 to your computer and use it in GitHub Desktop.
Save afrinc/3fe50772a8923b42b984778e75ac95e8 to your computer and use it in GitHub Desktop.
adding circle inside rectangular node
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