Activity 8_task 2
✓ Published0🌍 Public
This stacked bar chart visualizes movie ratings by genre, with each bar showing the percentage distribution across action, comedy, drama, thriller, and horror categories. The chart uses a horizontal layout with a linear x-axis for percentages and a band scale for genres, coloring each segment distinctly. Built with D3 v7, the visualization renders as SVG and includes interactive tooltips on mouseover that display the exact percentage for each genre-rating combination. The data is loaded from a CSV file and processed using D3’s stack layout and scaleOrdinal for color mapping.
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