I have a donut chart which updates data on click. I want to add labels to the same data. I am currently using the d3.js javascript library. Here is my code on jsfid
You have to use the arc.centroid function. Take a look at the following examples: