Q:

how to change text angle for labels in D3.js?

I want to change text axis of the labels so that they wont be overlapped when there is large number of labels. Fiddle is given below to see code
http://fiddle.jshell.net/fdzbv6vg/16/

A:

http://fiddle.jshell.net/4rsLghb7/
Line 59 Change :
 return "translate(`enter code here`" + arc.centroid(d) + ")";

To this
        return "translate(" + arc.centroid(d) + ")rotate(" + angle(d) + ")";

