Task_8_Activity_2_Question_2
✓ Published0🌍 Public
A stacked bar chart displays 2022 home run percentages across MLB league divisions, with each bar divided into five color-coded team segments. The visualization uses d3.stack() to compute stacked series, d3.scaleBand for the y-axis categories, and d3.scaleLinear for the x-axis percentages. Interactive tooltips appear on hover, showing the specific team and percentage value. The SVG chart includes axis labels, a title, and a custom color scale applied via d3.scaleOrdinal, with 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.
MIT Licensed