Activity6_Question2
✓ Published0🌍 Public
This example shows a horizontal stacked bar chart comparing car specifications—highway MPG, horsepower, and torque—across 31 manufacturers. The data is loaded from a local CSV file and rendered as SVG using D3 v7. The chart uses `d3.stack()` to aggregate the three numeric measures, `d3.scaleLinear()` for the x-axis, and `d3.scaleBand()` for manufacturer categories. Interactive tooltips display exact segment values on hover, and a color-coded legend distinguishes each specification.
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