Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart

Public visualization

Viewing a saved revision (read-only)

b876961f3ed34118bd5ab0f265daba1d

Pie Chart

0 stars0🌍 Public
AAlankruthSai
Last edited Mar 26, 2022
Created on Mar 25, 2022
Forked from Pie Chart

A pie chart displays the proportion of profits for each country in a dataset loaded from a CSV file. The visualization uses D3.js v5, employing the `pie` and `arc` functions to generate the circular segments, which are rendered as SVG paths. A legend, built with SVG `rect` and `text` elements, identifies each country and its corresponding profit value. Color encoding is applied via `scaleOrdinal` with a custom color range, and profit values are formatted as thousands (K) using the `format` function. The chart is titled "Profits in Each Country."

AI-generated description