Activity 6_Task 2_Tutorial
✓ Published1🌍 Public
A stacked horizontal bar chart from D3 v7 visualizes the distribution of IMDb rating categories across six film genres, with each bar segment proportionally sized by a percentage from the loaded CSV data. The chart uses d3.stack() to compute layer positions, d3.scaleBand() for the categorical axis, and d3.scaleLinear() for the percentage scale. Interactive hover effects trigger a custom tooltip displaying genre-specific percentage values, while d3.axisBottom and d3.axisLeft provide labeled axes. The SVG rendering uses ordinal color mapping for rating bands and supports the documentary, drama, comedy, romance, animation, and action genres.
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