🌍 Public
Viewing a saved revision (read-only)
ec39f23f754549318eb2e6e59517008f
Task 9 and 10 - PieChart
This pie chart visualizes vehicle registration counts by type, sourced from a CSV file. The code uses d3.pie to compute the arc segments and d3.scaleOrdinal for coloring sections. d3.arc generates the chart's slices, with each segment labeled via arcGenerator.centroid. A legend, built with SVG rectangles and text, identifies each vehicle type alongside its count, with labels formatted using d3.format. The chart is rendered as an SVG.
AI-generated description