Activity6Task2
✓ Published0🌍 Public
This example visualizes the distribution of IMDb ratings across different movie genres using a stacked horizontal bar chart. Each bar segment represents the percentage of movies within a specific rating bracket (below 5.0, 5.0-6.5, 6.5-7.5, 7.5-8.5, above 8.5) for genres like Documentary, Drama, Comedy, Romance, Animation, and Action. The visualization is rendered as SVG using D3 v7, with data loaded from a CSV file. It uses `d3.stack()` for stacked bars, `d3.scaleLinear()` and `d3.scaleBand()` for axes, and `d3.axisBottom()` for the x-axis. Hovering over a segment displays a tooltip showing the exact rating percentage for that genre and bracket.
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