Activity6_Q2
✓ Published0🌍 Public
A stacked bar chart compares car makes by three metrics: horsepower, torque, and highway MPG. Each horizontal bar is segmented by metric, with a color scale distinguishing them and a legend implied by the colors. The visualization loads CSV data via `d3.csv` and uses `d3.stack`, `d3.scaleOrdinal`, `d3.scaleLinear`, and `d3.scaleBand` to construct the SVG rendering. Interactive tooltips display the metric value on hover, using mouse events and a styled div.
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