Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Pie Chart

Public visualization

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

Comments

Sign in to join the discussion.

MIT Licensed