Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of ICE - 7 Pie Chart

Public visualization

Viewing a saved revision (read-only)

0fc895fdbc9548f5aa30f01a1ab103eb

Fork of ICE - 7 Pie Chart

0 stars0🌍 Public
MMar-99
Last edited Mar 28, 2022
Created on Mar 28, 2022
Forked from ICE - 7 Pie Chart

This example shows the percentage of sales for different items using a pie chart with a color-coded legend. The chart is rendered as an SVG, with each slice’s arc and fill color generated via `d3.arc()` and `d3.scaleOrdinal()`. Data is loaded asynchronously from a CSV URL using `d3.csv`, and the legend displays each item’s name and sales percentage, formatted with `d3.format`. The visualization relies on D3 v5 and a custom `bundle.js`, with the pie layout computed by `d3.pie()`.

AI-generated description