Activity7_task2
✓ Published0🌍 Public
This example visualizes the distribution of movie ratings across different genres as a stacked horizontal bar chart. Each bar shows the proportional percentage of ratings within five categories, from "below 5.0" to "above 8.5," with interactivity highlighting segments and displaying exact percentages via a tooltip. The chart uses `d3.stack()` to compute stacked series and `d3.scaleOrdinal` with a custom color palette for the rating categories. Data is loaded from a CSV file using `d3.csv`, and the SVG rendering includes axes via `d3.axisBottom` and `d3.axisLeft`, plus a manually drawn legend.
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