🌍 Public
Viewing a saved revision (read-only)
c6069e0a845c40d280e375c3a4a5571d
Activity 6 task2
This example shows the distribution of IMDb movie ratings across six genres, using a stacked horizontal bar chart where each bar segment represents the percentage of movies within a rating range. The visualization includes an interactive tooltip that displays the exact percentage for each genre and rating category on hover. The implementation uses D3 v7 with SVG rendering, leveraging `d3.stack()` for data stacking, `d3.scaleBand()` and `d3.scaleLinear()` for positioning, and `d3.scaleOrdinal()` with a custom color palette for rating categories. The data is loaded from a local CSV file with pre-calculated percentage 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.