Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

178
Vistas
D3 draw text in Arc without underline in text

I am working with D3 lib to show bubble chart. Everything is good util I draw a text in arc. To draw arc and text, I read in: https://www.visualcinnamon.com/2015/09/placing-text-on-arcs/. So, I want to draw text like this: Expected[1] [1]: https://i.stack.imgur.com/2KN5x.png In my opinion, I will create 2 arcs with 1 arc is hidden and append text. To create a arc path, I have: M start-x, start-y A radius-x, radius-y, x-axis-rotation, large-arc-flag, sweep-flag, end-x, end-y. But when I create, I difficulty when draw coordinates start_x and start_y, end_x, end_y. This is my output. My output[2] [2]: https://i.stack.imgur.com/Lwplg.png My code of arc hidden:

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

And code of arc show:

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

I try increase coordinate_x and coordinate_y at start point and end point but it's not true. Ignore about color, I hope that anyone can help this. You can checkout source code in: https://github.com/hunghaui2310/d3-bubble-chart Check it in 507 line of /js/script.js. Thanks all

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda