Activity6_Task2
✓ Published0🌍 Public
This example visualizes IMDb movie ratings by genre as a stacked horizontal bar chart, showing the percentage distribution of ratings across five categories (below 5.0 to above 8.5) for six genres, from Documentary to Action. The chart uses D3 v7 APIs including `d3.stack()` to create the stacked segments, `d3.scaleOrdinal()` for color encoding, and `d3.scaleBand()` for the categorical y-axis. Interactive tooltips appear on hover, revealing precise percentages via a custom HTML div. The dataset is loaded from a local CSV file and rendered as SVG, with the title "Rating according to genres" displayed above the plot.
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