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 jsfiddle
What I don't understand it how to add labels to segments of the donut chart?
To add text labels with arrows that point to the doughnut rings, do the following: On the Layout tab, in the Insert group, click Text Box. Click on the chart where you want to place the text box, type the text that you want, and then press ENTER.
To build a 3D Doughnut chart, use the anychart. pie3d() chart constructor and the innerRadius() method to set the inner radius. The radius is 0 by default and can be set either as a value or a percentage of the chart's bounds.
You have to use the arc.centroid function. Take a look at the following examples:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With