🌍 Public
Viewing a saved revision (read-only)
056c6c1ed03745c0bd05efc79f9c3a6e
Actitvity7:Questions:1
A pie chart visualizes the distribution of car fuel types from a CSV dataset, displaying each category with percentage labels and a matching legend. Built with D3 v6, the chart counts fuel-type occurrences, computes percentages, and renders slices using `d3.pie` and `d3.arc`, with a categorical color scheme from `d3.scaleOrdinal`. Percentages are placed on each slice via `arc.centroid`, while the legend is constructed with HTML elements styled by the same color scale. The SVG output is centered in the page, with data loaded asynchronously via `d3.csv`.
AI-generated description