Fork of Activity 6
✓ Published0🌍 Public
This example visualizes the percentage distribution of movie ratings across six genres using a stacked bar chart rendered with SVG. The chart displays rating categories from below 5.0 to above 8.5 as colored segments, with each genre represented as a horizontal bar. The code loads data from a CSV file using `d3.csv` and constructs the visualization with `d3.scaleBand`, `d3.scaleOrdinal`, and `d3.stack`. Interactive tooltips appear on mouseover, showing the exact percentage for each segment. Colors are assigned using `d3.schemeCategory10`, and hover effects are implemented with CSS transitions.
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