activity6_Question2
✓ Published0🌍 Public
This example shows a horizontal stacked bar chart comparing the percentage of movie ratings across different genres. Each genre (banana, poacee, sorgho, triticum) is a row, and each colored segment represents a rating category's proportion. The chart uses D3 v7's `scaleBand` for the y-axis, `scaleLinear` for the x-axis, and `stack()` to create the stacked segments from the CSV data. Hovering over a segment uses a custom tooltip to display the exact percentage for that genre and rating category.
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