Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

A10 - 1

Public visualization

Viewing a saved revision (read-only)

040c9d539dd04e9bb106e9774f3f28a8

A10 - 1

0 stars0🌍 Public
MMike Z
Last edited Nov 23, 2022
Created on Nov 23, 2022
Forked from Fork of Pie Chart

This visualization shows the protein content of various foods as a pie chart, with each segment colored and labeled in a legend. The chart reads data from a CSV file, converts protein values to numbers, and computes the total to render the arcs. Using D3 v5, the code applies the `pie` and `arc` generators, scales colors with `scaleOrdinal`, and formats tick values with `format`. A legend displays each item name and its protein amount in grams, with the SVG positioned at a fixed size.

AI-generated description