1

We have a strange issue of overlapping labels in the aster plot d3 chart. We have used the d3 chart library & reference of http://bl.ocks.org/bbest/2de0e25d4840c68f2db1 In below image, 0.02% overlaps 2.91% pie.

To plot the polyline and label, I have referred http://bl.ocks.org/dbuezas/9306799

enter image description here

Gerardo Furtado
  • 100,839
  • 9
  • 121
  • 171
Prakash Donga
  • 558
  • 5
  • 10

1 Answers1

1

Warning: this is an ad hoc solution.

Using the index of the problematic label (in the CodePen you shared, it's 6) you can move everything, texts and polylines, a little bit up or down. In this case, down:

pos[1] = index === 6 ? pos[1] + 12 : pos[1];
outerArcCen[1] = index === 6 ? outerArcCen[1] + 10 : outerArcCen[1];

Here is the result: http://codepen.io/anon/pen/YZgXxa?editors=0010

Gerardo Furtado
  • 100,839
  • 9
  • 121
  • 171