I have an SVG image and I want to attach circles next to the paths with id attach.
Here is my code:
const svg = d3.select('#svgImage').attr('width', 500).attr('height', 500)
svg
.select('#attach')
.append('svg:circle')
.attr('cx', 100)
.attr('cy', 100)
.attr('r', 500)
.style('fill', '#69b3a2')
.attr('stroke', 'black')
.attr('stroke-width', 2)
Problem: The circle is added as a child of the path and if I add it manually next to the path, it shows at the end of the SVG image.