Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Interactive Pie Chart for world milk production

Public visualization

Interactive Pie Chart for world milk production

0 stars0๐ŸŒ Public
PPriyaEnuganti
Last edited Jul 3, 2022
Created on Jul 2, 2022
Forked from Face by priya

This interactive donut chart visualizes the top eight countries by milk production in millions of tonnes, using a color-coded categorical scale. Hovering over a slice reveals a tooltip showing the percentage of total production for that country. Built with React and rendered as SVG, it uses d3.pie and d3.arc to compute slice geometry, d3.scaleOrdinal for colors, and d3.sum to calculate percentages. The legend-free design labels each country directly on its slice.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed