Skip to main content
100%

Cosmetic Pie Chart

✓ Published1🌍 Public
Ddeepthiv.4706@gmail.com
Last edited Apr 1, 2025
Created on Apr 1, 2025
Forked from Pie Chart

This pie chart displays the distribution of cosmetic product labels—such as Lipstick, Foundation, and Eyeliner—from a CSV dataset loaded via `d3.csv`. The chart uses `d3.pie()` and `d3.arc()` to generate slices, with `d3.scaleOrdinal(d3.schemeCategory10)` assigning colors. Each slice includes a white text label positioned using `arc.centroid`. A legend, built with SVG rectangles and text, maps each color to its full product name. The SVG is rendered at 700×500 pixels with a red title, and all styling is applied via CSS.

AI-generated description
MIT Licensed

Similar vizzes