Skip to main content
100%

ICE 7 - Question 2

✓ Published0🌍 Public
KKrishna.
Last edited Apr 2, 2025
Created on Apr 2, 2025

A pie chart shows the distribution of movies across six genres, with each slice labeled and a legend displaying counts. The visualization is rendered as an SVG using D3 v6, employing `d3.pie()` to generate arc data and `d3.arc()` to draw the slices. Color encoding uses `d3.scaleOrdinal()` with `d3.schemeCategory10`. The code leverages D3's selection and data-binding methods to append paths and text, with labels positioned via arc centroids and a separate legend built from the input data array.

AI-generated description
MIT Licensed

Similar vizzes