🌍 Public
Viewing a saved revision (read-only)
2adc46e99e774539ba250bc41a6e9e99
Placing text within a arc
This donut chart displays eight animal categories in equal segments, with labels positioned along the arc’s outer edge. Labels below the horizontal midline are flipped to remain upright, improving readability. Built with D3.js 3.5, the example uses `d3.svg.arc` for the donut slices and `d3.layout.pie` to compute the angles. It programmatically manipulates the SVG path data for the text placement, reversing the arc direction for segments where the end angle exceeds 90 degrees.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.