All examples By author By category About

martinjc

D3 - Donut chart with labels and connectors (Data: random teaching evaluation survey results)

This examples creates a d3 donut chart, with labels and lines connecting labels to segments.

Labels are arranged to avoid overlap, label text is wrapped to ensure it fits on the page

The pie chart code is modular, so can be reused simply.