Activity6_Task2 (tutorial)
✓ Published0🌍 Public
This example uses a stacked bar chart to show the distribution of IMDb movie ratings across six genres, with each bar segment representing a rating range (below 5.0 to above 8.5) as a percentage. The chart loads data from a local CSV file and renders it as SVG using D3 v7, employing `d3.stack()` to compute the stacked segments, `d3.scaleOrdinal` for color coding, and `d3.scaleBand` for the categorical y-axis. Interactive tooltips appear on hover, displaying the exact percentage for each genre-rating combination, while axis labels and a title provide context.
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