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)

ad31c36f9c9345a88f627a09d294f8e1

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.