🌍 Public
Viewing a saved revision (read-only)
a7ac511453de4ca7b6304cb2d22d8d05
Activity6_Task2
This example displays a stacked horizontal bar chart of IMDb movie ratings across six genres, with each bar segmented into five rating ranges from "below 5.0" to "above 8.5" as percentages. The chart uses D3 v7’s `d3.stack` to aggregate genre data, `d3.scaleLinear` for the percentage axis, and `d3.scaleBand` for genre categories. Interactive tooltips appear on hover, showing the exact percentage for each rating segment, while bars reduce opacity for visual feedback.
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.