Skip to main content
100%

ICE7 - Q2 Pie Chart with D3

✓ Published0🌍 Public
PPbarring
Last edited Mar 27, 2022
Created on Mar 24, 2022

This example shows the average gas prices by month for the year 2021 as a simple pie chart, accompanied by a legend listing each month and its corresponding dollar value. The visualization uses D3 v5 to load data from a CSV file via `d3.csv` (wrapped in an async fetch), process it with `d3.pie`, and render SVG paths using `d3.arc`. A `d3.scaleOrdinal` assigns a distinct color to each slice, while `d3.format` displays the price values in the legend.

AI-generated description
MIT Licensed

Similar vizzes