Skip to main content
100%

q1

✓ Published0🌍 Public
Ppnamitha46@gmail.com
Last edited Nov 5, 2024
Created on Nov 5, 2024
Forked from Hello VizHub

This example shows how movie genres are distributed across rating categories using a pie chart, with each slice sized according to the percentage of movies in a particular genre. It loads D3 v7 via UNPKG and uses the `d3.pie` and `d3.arc` APIs to generate the chart, with `d3.scaleOrdinal` for color encoding and `d3.select` for DOM manipulation. Interactive tooltips appear on mouseover, displaying the genre name and percentage, while text labels inside each slice show the computed percentage values. A legend is built dynamically using D3's selection and data-binding methods.

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