Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

115
Visualizações
Add circle next to the path of svg using D3.js

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.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda