Skip to main content
100%

Activity 7 Q1

✓ Published0🌍 Public
Ppuppireddyarchana@gmail.com
Last edited Apr 10, 2025
Created on Apr 10, 2025
Forked from Hello VizHub

This D3.js pie chart displays the box office collections (in ₹ Cr) for Mahesh Babu movies. It uses `d3.pie()` to compute the arc segments and `d3.arc()` with an inner radius of zero for the slices. A color scale from `d3.scaleOrdinal` with the `d3.schemeSet2` range fills each slice, and percentage labels are positioned using `arc.centroid()`. A legend, built with SVG rectangles and text, identifies each movie, with data loaded via `d3.json`. The chart is rendered as an SVG, and the title, labels, and legend are all part of the same SVG canvas.

AI-generated description
MIT Licensed

Similar vizzes