Skip to main content
100%

7.1 Question 1

✓ Published0🌍 Public
Ssaishruthik2361@gmail.com
Last edited Nov 2, 2024
Created on Nov 2, 2024
Forked from Hello VizHub

This example shows a fruit distribution pie chart, visualizing the quantity of each fruit in a CSV dataset loaded from a GitHub gist. D3 v5 loads the data with `d3.csv`, converts it to an object mapping fruit names to numeric quantities, and uses `d3.pie` and `d3.arc` to generate the SVG paths. Each slice is filled with a categorical color from `d3.schemeSet2` via `d3.scaleOrdinal`, and labeled with the fruit name using SVG text elements positioned at each arc’s centroid.

AI-generated description
MIT Licensed

Similar vizzes