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