Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Donut Chart D3

Public visualization

Donut Chart D3

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed