🌍 Public
Viewing a saved revision (read-only)
d15982483d5f4826b40ecc3648e53409
Activity_6 task2
This example visualizes IMDb movie ratings by genre as a stacked horizontal bar chart, showing the proportion of titles falling into five rating brackets from below 5.0 to above 8.5. The chart uses d3.stack with d3.scaleOrdinal for color encoding and d3.scaleBand for the categorical genre axis, rendering SVG rectangles per segment. Interactive tooltips display exact percentages on hover using d3.select and mouse event handlers. Data comes from a CSV file with pre-aggregated genre-wise rating distributions.
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.