Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart

Public visualization

Viewing a saved revision (read-only)

0944745ef787403cbcbaaf29e48bd2c2

Pie Chart

0 stars1🌍 Public
Ssalimjivani
Last edited Mar 28, 2022
Created on Mar 28, 2022

A pie chart visualizes the distribution of documentary film titles by their associated values and percentages, with an accompanying legend displaying each label, numeric value, and percentage. The chart uses D3 v5’s `pie()` generator with a null sort to compute arc segments, which are rendered as SVG paths via the `arc()` function. A color scale (`scaleOrdinal`) maps values to a custom palette. The legend is built manually with rectangles and text elements, formatted using `format('.4~g')` for the values. The data is loaded asynchronously from a local JSON file using `json()`.

AI-generated description