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

169
Visualizações
Add description text and links in zoomable circle packing graph with d3

I am still new at d3 and want to create a zoomable circle graph with title text, description text and links (the links only displayed in the leafs) that can be clicked and open a new page.

I have figured out how I can add those in a normal circle pack, but I can't implement it with the zoomable circle graph (not displayed)

It would be so great if someone could help me with it because I am so stuck with this.

Here my full working example at CodePen https://codepen.io/Lea12/pen/ExvoEgx

And the not working code

var description = g.selectAll("text")
                   .append("text")
                   .attr("class","description")
                   .attr("dy", +80)
                   .style("display", function(d) { 
                     return d.parent === root ? "inline" : "none";
                   })
                   .text(function(d) {
                     return d.data.description;
                   });
  
var url = g.selectAll("text")
           .append("text")
           .attr("class","description")
           .attr("dy", +120)
           .text("click for more information")
           .on("click", function(d) {
             window.open(d.data.url,"_blank")
           })
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