Activity_6_Task_2
✓ Published1🌍 Public
This example visualizes IMDb movie ratings across six genres, showing the distribution of ratings in five percentage-based categories using a stacked horizontal bar chart. The chart highlights how genres like Documentary skew toward higher ratings, while Action concentrates in lower ranges. Built with D3 v7, it uses `d3.stack()` to aggregate the categorical data, `d3.scaleBand()` for genre positioning, and `d3.scaleOrdinal()` for color encoding. Interactive tooltips display exact percentages on hover, while axis labels, a title, and a legend clarify the rating breakdown and genre ordering.
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.
MIT Licensed