Activity 6_Task2
✓ Published0🌍 Public
This example visualizes the distribution of movie ratings across genres using a stacked horizontal bar chart. The chart, titled "Rating according to genres," displays the percentage of movies falling into five rating brackets (from below 5.0 to above 8.5) for each genre, sourced from a local CSV file. Built with D3 v7, the visualization uses `d3.stack()` to create stacked bars, `d3.scaleOrdinal()` for color coding, and `d3.scaleLinear()` for the x-axis. Interactive tooltips appear on hover, showing the exact percentage for each rating category within a genre.
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