Skip to main content
100%

Donut Chart D3

✓ Published0🌍 Public
SSiddharthMittal07
Last edited Mar 8, 2022
Created on Mar 7, 2022
Forked from React Starter

This interactive donut chart displays categorical data as colored arcs, with a hover effect that enlarges the selected segment. Built with React and rendered as SVG, it uses D3’s `pie` generator to compute arc paths and `scaleOrdinal` for the yellow, red, blue, and green color mapping. On mouse enter, the corresponding arc is redrawn with a larger `arc` radius, while a separate `hoveredArc` path is drawn beneath. The data is hardcoded as an array of `x` and `y` values.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes