Skip to main content
100%

Pie Chart

✓ Published1🌍 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
MIT Licensed

Similar vizzes