Activity_6_Question2
✓ Published0🌍 Public
This stacked horizontal bar chart displays the percentage distribution of ratings across five business types, from "Less than 2.0" to "More than 5.5". Each bar is segmented into colored sections representing rating categories, using `d3.stack()` for data transformation and `d3.scaleOrdinal()` for color mapping. The chart renders as scalable vector graphics (SVG) with axes generated by `d3.axisBottom()` and `d3.axisLeft()`. Interactive tooltips, implemented with mouseover events, reveal exact percentages per category on hover, while the data originates from the included `data.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