🌍 Public
Viewing a saved revision (read-only)
ad1e13d498564c55afad7100e91f891a
Fork of A2 Ques 1
This example shows the distribution of smartphone types in a pie chart with an interactive legend. The visualization uses d3.pie and d3.arc to generate the slices, with d3.rollup aggregating the CSV data by the "Smartphone Type" column. Each slice is labeled with its category name, and a separate legend displays color swatches for all categories. The chart is rendered as an SVG using d3.v7, with a color scale from d3.scaleOrdinal. The CSV data is loaded from a remote GitHub gist, and the layout is centered via flexbox CSS.
AI-generated descriptionAssignment 2 Pie chart