Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
No se pueden agregar puntos suspensivos en la primera carga d3

No sé por qué sucede esto, cuando cargo mi gráfico por primera vez, el texto no se puede elipsar. Pero después de ir a otra página y volver, funcionó bien. ¿Hay algo mal con mi código?

 tickVertical .selectAll('text') .each(function () { // @ts-ignore const self = select(this); // @ts-ignore let textLength = self.node().getComputedTextLength(); let text = self.text(); while (textLength > 50 && text.length > 0) { text = text.slice(0, -1); self.text(text + '...'); // @ts-ignore textLength = self.node().getComputedTextLength(); } }) .attr('fill', 'white') .attr('font-size', '8px') .each(function (d: any) { select(this).append('title').text(d); });

El error de cada método, después de que console.log, el texto y la longitud del texto son 0.

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!