Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of A2 Ques 1

Public visualization

Viewing a saved revision (read-only)

4a700b6b8ccd417f89a35fe53fe8e51d

Fork of A2 Ques 1

0 stars0🌍 Public
Ssujitrayudu01@gmail.com
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from 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 description

Assignment 2 Pie chart