I am using aster plot of d3 in my project. I want legend labels along with the arc radius outside the circle.
I could get an example of piechart showing labels along and outside the arc. http://bl.ocks.org/Guerino1/2295263
But i am unable to implement the same in aster plot of d3. http://bl.ocks.org/bbest/2de0e25d4840c68f2db1
Any help would be appreciated. Thanks
Couple things to fix.
1.) You have to introduce margins into the aster plot for the labels.
2.) You then have to take the outer arcs, add a an svg
g
do you can group a path with a text:Note I had to create my own centroid function to move the labels outside the arc. The code in the pie chart example you linked did not work for me (it's using a old d3 version).
Here's my centroid function stolen from the d3 source:
Here's a working example.
Full code: