🌍 Public
Viewing a saved revision (read-only)
cb904f1c4e92410492815d1f061aa7a9
Activity 6 question 3
This example displays the distribution of movie ratings across six genres, with each genre’s ratings segmented into five ordered categories from “below 5.0” to “above 8.5.” The visualization uses horizontal stacked bars to compare proportions, with each bar’s segments colored and labeled. The D3 library is loaded via UNPKG and used to render the chart, employing the `d3.csv` to parse the data and `d3.scaleBand` for the x-axis. Tooltips appear on hover, displaying the exact proportion for a given segment. The code imports D3 functions through ES6 modules and leverages custom CSS for styling fonts and tooltips.
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.