Activity 7-3: IMDb Movie ratings
✓ Published0🌍 Public
This example visualizes the distribution of IMDb movie ratings across six genres as a stacked horizontal bar chart. Each bar shows the proportion of movies falling into five rating brackets, from below 5.0 to above 8.5, with interactive tooltips revealing exact percentages on hover. The chart uses d3.csv to load the data, d3.stack to compute the stacked segments, and d3.scaleOrdinal with a custom color palette. SVG rendering with d3.axisBottom and d3.axisLeft provides the axes, while mouseover events trigger the tooltip display.
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