🌍 Public
Viewing a saved revision (read-only)
ad57f8feb7f6437eb78cb4f28d831d93
Activity_6 task 2 Tutorial
This example visualizes the distribution of movie ratings across genres using a stacked horizontal bar chart. It shows the percentage of ratings in five categories, from "below 5.0" to "above 8.5", for genres such as Documentary, Drama, Comedy, Romance, Animation, and Action. The visualization uses D3.js v7 with SVG rendering, employing `d3.scaleOrdinal` for color coding, `d3.axisBottom` and `d3.axisLeft` for axes, and `d3.stack` to create the stacked segments. Tooltips display exact percentages on hover, using data loaded from a local CSV file.
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.