Skip to main content
100%

Task 9 and 10 - PieChart

✓ Published1🌍 Public
PPothuguntla Pranitha
Last edited Apr 29, 2024
Created on Apr 29, 2024

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
MIT Licensed

Similar vizzes