Skip to main content
100%

JC-Task-9-10

✓ Published1🌍 Public
JJames Cruz
Last edited Apr 28, 2024
Created on Apr 28, 2024
Forked from Hello VizHub

This example shows a pie chart that breaks down a movie dataset by genre, displaying the count of movies in each category with labeled slices and a color-coded legend. The visualization also includes X and Y axis titles, though the chart itself is circular. The code loads data from a CSV file and uses D3 v5’s `csv`, `pie`, and `arc` functions to generate the slices, while `select` and `append` build the SVG elements. The chart fills the entire browser window, with genres like Drama and Action assigned distinct colors.

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