Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

JC-Task-9-10

Public visualization

JC-Task-9-10

0 stars1🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed