Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart for nutrition analysis

Public visualization

Viewing a saved revision (read-only)

0bc87a70d51847808c03684fc687571a

Pie Chart for nutrition analysis

0 stars0🌍 Public
Ttejasviteegala@my.unt.edu
Last edited Mar 27, 2024
Created on Mar 27, 2024
Forked from HTML Starter

This pie chart visualizes the nutritional breakdown of a Kinder Joy product, showing the percentage distribution of components like fat, sugar, and protein. The chart uses D3.js v5 to generate SVG arcs, with each segment labeled with its percentage value and a legend identifying the corresponding nutrient. Data is loaded from a CSV file hosted in a GitHub gist. The visualization employs `d3.pie` for angle generation, `d3.arc` for path construction, and `d3.scaleOrdinal` to assign distinct colors to each category.

AI-generated description

This Pie Chart has been created using html,css,d3.js.