Activity6_Task2
This chart visualizes the distribution of IMDb ratings across six film genres using a stacked horizontal bar chart. Each genre row is segmented into five rating categories, from below 5.0 to above 8.5, with segment lengths representing the percentage of titles in each category. The visualization uses D3.js v7 with an SVG renderer, employing `d3.stack()` to aggregate data, `d3.scaleOrdinal()` with a custom color palette to distinguish rating bands, and `d3.axisBottom` plus `d3.axisLeft` for the percentage and genre axes. Interactive tooltips display exact percentages on mouseover via D3 event handlers. The data comes from the provided `data.csv` file, showcasing proportional comparisons of rating distributions among genres.
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.