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

182
Views
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
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!