🌍 Public
Viewing a saved revision (read-only)
68028caf4b9644a5a3998ea6f3ea1c31
Question 3
A stacked horizontal bar chart displays the distribution of movie ratings across six genres, with each bar segmented into five rating categories from "below 5.0" to "above 8.5." The chart uses D3 v7's `d3.stack()` and `scaleOrdinal` for color mapping, with `scaleLinear` for the x-axis and `scaleBand` for genres. Tooltips appear on mouseover via `d3.select` and `event.pageX`/`pageY`, showing the exact percentage per rating category. Data originates from a local `data.csv` file rendered as SVG.
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.