Activity 6_Task 2
✓ Published0🌍 Public
This example shows the distribution of IMDb movie ratings across six genres, with horizontal stacked bars displaying the percentage of movies in five rating categories from below 5.0 to above 8.5. The visualization uses d3.stack() to compute the stacked series, d3.scaleBand() and d3.scaleLinear() for positioning, and d3.scaleOrdinal() for color mapping. Interactive tooltips appear on mouseover via d3.select and event listeners, displaying the exact percentage for each genre-rating combination. The data comes from a CSV file loaded with d3.csv, rendered as SVG elements.
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