Skip to main content
100%

Pie Chart

✓ Published0🌍 Public
Ppreethamkesa
Last edited Mar 26, 2022
Created on Mar 25, 2022
Forked from Pie Chart

This pie chart visualizes the total revenue of different countries in sales. The D3 v5 code uses `select`, `pie`, `arc`, and `scaleOrdinal` to generate SVG segments from a JSON dataset, with each slice colored distinctly. A legend, created via `append` with rectangles and text, identifies each region and its corresponding revenue value, formatted with `format('.4~g')` and suffixed with "K". The chart is centered on a 960x500 canvas, with the pie translated to the left and the legend positioned to the right.

AI-generated description
MIT Licensed

Similar vizzes