Skip to main content
100%

Butter Macronutrients

✓ Published0🌍 Public
CCurran Kelleher
Last edited Sep 3, 2025
Created on Sep 3, 2025
Forked from Clickable Circles

A pie chart visualizes butter's macronutrient composition per 100 grams, showing fat as the dominant slice at 81.11g alongside smaller protein and carbohydrate segments. Clicking any slice highlights it with a darker stroke and full opacity while dimming others. Built with D3 v7, the chart uses pie and arc generators with a custom start angle for rotation, and labels position via arc centroid calculations. A unidirectional data flow pattern manages selection state, with the SVG rendered through d3.select and join operations.

AI-generated description
MIT Licensed

Similar vizzes