Skip to main content
100%

donut

✓ Published1🌍 Public
MMTR
Last edited Jun 15, 2022
Created on May 6, 2021
Forked from circles

This donut chart uses D3 version 6 to render a single, five-segment ring where each segment is a wedge of equal value. The visualization employs `d3.arc` with dynamically calculated inner and outer radii based on the segment index, and `d3.pie` to compute the arc geometry. Each wedge is filled with a color from `d3.scaleSequential` using the `d3.interpolateRainbow` palette, and labeled with its data index. The entire SVG group is positioned using a CSS transform, though the code’s intended rotation animation is present but not functional, as the rotation angle is fixed to zero.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes