Activity6_Task2
✓ Published2🌍 Public
This example presents a stacked horizontal bar chart showing the distribution of IMDb ratings across different genres, with each genre broken into five rating categories from "below 5.0" to "above 8.5." The visualization uses D3 v7’s `d3.stack()` function to compute stacked values and `d3.scaleOrdinal()` with a custom color palette to distinguish rating bands. Interactive mouseover events, handled via `.on()`, reveal tooltips displaying the exact percentage for each genre-rating combination. The chart is rendered as an SVG, with axes formatted using D3’s `d3.axisBottom` and `d3.axisLeft`, and data is loaded from a local CSV file.
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