🌍 Public
Viewing a saved revision (read-only)
6e0fbf2db0354430b59216071ac9a3a4
Tutorial 2 Question 3
This stacked bar chart displays the proportional distribution of five rating categories across three named categories, with each category's segments summing to 100%. The visualization uses D3 v7's `d3.stack()` and `d3.scaleOrdinal()` to generate colored horizontal bars, with `d3.scaleLinear` and `d3.scaleBand` handling the axes. Interactive tooltips, created via DOM elements, appear on mouseover to show precise percentages formatted with `d3.format`. The data comes from a local CSV file, rendered as SVG, with styling defined in a separate CSS stylesheet.
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.