Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ICE - 7 Pie Chart

Public visualization

Viewing a saved revision (read-only)

28f14cab46bf4677a56cf23229615f34

ICE - 7 Pie Chart

0 stars10🌍 Public
RRamyapriyaPutta
Last edited Mar 27, 2022
Created on Mar 27, 2022
Forked from ICE - 7 Pie Chart

This example displays the percentage of total sales for different items in a pie chart using D3 v5. The code loads CSV data from a GitHub gist and renders an SVG with a pie chart and a legend, with each slice and legend entry colored by a fixed ordinal scale. It uses `d3.csv`, `d3.pie`, and `d3.arc` to compute and draw the arc segments, and `d3.scaleOrdinal` for color mapping, while formatting the percentage labels with `d3.format`.

AI-generated description