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

175
Views
D3 dibuja texto en Arc sin subrayar en el texto

Estoy trabajando con D3 lib para mostrar el gráfico de burbujas. Todo está bien hasta que dibujo un texto en arco. Para dibujar arco y texto, leo en: https://www.visualcinnamon.com/2015/09/placeing-text-on-arcs/ . Entonces, quiero dibujar un texto como este: Esperado [1] [1]: https://i.stack.imgur.com/2KN5x.png En mi opinión, crearé 2 arcos con 1 arco oculto y agregaré texto . Para crear una ruta de arco, tengo: M inicio-x, inicio-y A radio-x, radio-y, rotación del eje x, bandera de arco grande, bandera de barrido, final-x, final-y. Pero cuando creo, tengo dificultad para dibujar las coordenadas start_x y start_y, end_x, end_y. Esta es mi salida. Mi salida[2] [2]: https://i.stack.imgur.com/Lwplg.png Mi código de arco oculto:

 .attr('d', function (d, i) { const start_x = dr * k; const start_y = 0; return 'M ' + -start_x + ' ' + start_y + ' A ' + start_x + ' ' + start_x + ' 0 0 1 ' + start_x + ' ' + start_y; })

Y el código de arco muestra:

 .attr('d', function (d, i) { const start_x = dr * k; const start_y = 0; return 'M ' + -start_x + ' ' + start_y + ' A ' + start_x + ' ' + start_x + ' 0 1 0 ' + start_x + ' ' + start_y; })

Intento aumentar las coordenadas_x y las coordenadas_y en el punto de inicio y en el punto final, pero no es cierto. Ignorar sobre el color, espero que alguien pueda ayudar con esto. Puede consultar el código fuente en: https://github.com/hunghaui2310/d3-bubble-chart Compruébelo en la línea 507 de /js/script.js. Gracias a todos

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!