vyjuhub1
✓ Published0🌍 Public
This interactive pie chart visualizes box office revenue for ten blockbuster movies, with each slice sized proportionally to earnings in billions. The chart renders in SVG with a color-coded legend positioned to the right. Users can hover over slices to reveal a tooltip displaying the movie’s year and revenue, using mouse events that toggle visibility and track cursor position. The code employs D3 v7 APIs including `d3.pie()`, `d3.arc()`, and `d3.scaleOrdinal` with the `schemeCategory10` palette.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG (pinned at v6, since this runtime environment only supports UMD, and in v7 D3 dropped UMD support)
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed