Activity_6_task_2
✓ Published1🌍 Public
This example visualizes the distribution of IMDb movie ratings across six genres using a stacked horizontal bar chart. It shows the percentage of movies falling into five rating brackets, from below 5.0 to above 8.5, with each genre represented as a distinct bar. The chart is built with D3 v7, using d3.stack() to compute the stacked segments, d3.scaleOrdinal() for color encoding, and d3.scaleBand() for the categorical y-axis. Interactive tooltips reveal exact percentages on mouseover, using d3.select() and element event handlers. The data comes from a CSV file containing genre and rating proportion values.
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