🌍 Public
Viewing a saved revision (read-only)
3a5ecb4f583547149030270f23fec5dc
act8_t2
A stacked horizontal bar chart visualizes the proportion of ratings across food categories, with each bar segmented by rating ranges from "Below 4" to "Above 8." The chart uses d3.stack to compute stacked series and d3.scaleBand for categorical positioning. An ordinal color scale distinguishes rating bands, while interactive tooltips display exact percentages on hover, built with D3 event handlers and HTML div elements. The SVG rendering includes custom axes with gridlines and a legend.
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.