Fork of Activity_6 Question2
✓ Published0🌍 Public
This example visualizes the percentage of movie ratings by genre using a stacked horizontal bar chart. Each bar segment represents a genre, with colors mapping to categories like Comedy or Drama, and hover interactions reveal precise percentages. Built with D3 v7, the chart utilizes `d3.stack` to compose the data, `d3.scaleBand` and `d3.scaleLinear` for axes, and SVG rendering. The tooltip is implemented with a custom HTML div, while styling comes from a Google Fonts import.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed