Skip to main content
100%

Task 9

✓ Published0🌍 Public
Kkeerthi.yanala104@gmail.com
Last edited Apr 26, 2024
Created on Apr 26, 2024
Forked from Hello VizHub

This visualization displays the top 20 Netflix TV shows and movies as a pie chart, with each slice labeled by its count and accompanied by a color-coded legend. It loads data from a GitHub-hosted CSV file using d3.csv, then sorts and filters it to show only the top entries. The chart uses d3.pie to generate arc data and d3.arc to draw SVG paths, with d3.scaleOrdinal assigning colors to slices. Text labels are positioned using arc.centroid, while the legend is built with SVG rect elements and text in a d3.selectAll pattern.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes