Skip to main content
100%

Fork of Reusable Scatter plot Activity 8

✓ Published0🌍 Public
SSupriya Ravilla
Last edited Apr 9, 2024
Created on Apr 9, 2024

This fork demonstrates a reusable pie chart that visualizes the species counts from the Iris dataset, loaded via the `d3.csv` function. The chart renders as SVG using D3 v7 APIs, including `d3.arc` for arc path generation and `d3.pie` for computing arc angles from the count data. A categorical color scale maps each species to a distinct color, with an accompanying legend built through D3 selections. The visualization is encapsulated in a custom `pieChart` function, which accepts configurable width, height, margin, and color scale setters.

AI-generated description

A demonstration of reusable scatter plot.

MIT Licensed

Similar vizzes