🌍 Public
Viewing a saved revision (read-only)
4a7138871a6d44fca27b609ad2ccc146
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