task_2 sekhar
✓ Published0🌍 Public
This chart shows the distribution of IMDb movie ratings across six genres, with each horizontal bar segmented into five rating brackets. The visualization uses diverging stacked bars to compare the proportion of films in each category, rendered as SVG rectangles scaled by percentage. The code leverages D3 v7’s `scaleOrdinal` for color mapping, `scaleBand` for the genre axis, and `stack` to compute cumulative values. Interactive tooltips display exact percentages on hover, using D3’s event handling and DOM selection.
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